Tools (client-side only, no backend):
Install node
v18
or higher,
npm
v8
or higher, and
yarn
v1
.
⚠️ Note thatnpm
is included in most distributions ofnode
.
💡 If your distribution does not come with the correct
node
version, one solution is to installnvm
and then runnvm use
inside the repository clone for every new shell.
# Install dependencies and setup git hooks
yarn
# Served at http://localhost:8000
yarn dev
More info: https://www.gatsbyjs.com/docs/reference/gatsby-cli/#develop
More info:
yarn cu --help
or https://github.com/raineorshine/npm-check-updates
yarn cu
yarn up
Then run yarn
to update yarn.lock
and local node_modules
. Commit both
changes to package.json
and yarn.lock
. If you want to start fresh, remove
yarn.lock
and node_modules
, then run yarn
.
yarn build
More info: https://www.gatsbyjs.com/docs/reference/gatsby-cli/#build
# Served at http://localhost:9000
yarn serve
More info: https://www.gatsbyjs.com/docs/reference/gatsby-cli/#serve
yarn clean
More info: https://www.gatsbyjs.com/docs/reference/gatsby-cli/#clean
More info:
yarn lint --help
or https://github.com/xojs/xo
yarn lint
# NOTE This is run automatically on commit.
yarn lint-and-fix
More info:
yarn tc --help
or https://www.typescriptlang.org/docs
# NOTE This is run automatically on commit.
yarn tc
yarn tc:watch