diff --git a/.gitignore b/.gitignore index 3b4cc57d8e0..aa927ae0804 100644 --- a/.gitignore +++ b/.gitignore @@ -11,6 +11,7 @@ !/.github/ !/.gitignore !/.npmrc +!/.nvmrc !/.release-please-manifest.json !/.reuse/ !/*.md diff --git a/.nvmrc b/.nvmrc new file mode 100644 index 00000000000..3c032078a4a --- /dev/null +++ b/.nvmrc @@ -0,0 +1 @@ +18 diff --git a/.reuse/dep5 b/.reuse/dep5 index 15e76f7b9bd..375d6563094 100644 --- a/.reuse/dep5 +++ b/.reuse/dep5 @@ -7,6 +7,6 @@ Files: content/* static/* Copyright: 2020 GitHub License: CC-BY-4.0 -Files: scripts/* cli/* theme/* src/* .github/* *.md *.js *.json .npmrc .gitignore +Files: scripts/* cli/* theme/* src/* .github/* *.md *.js *.json .npmrc .gitignore .nvmrc Copyright: 2020 GitHub License: MIT diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 6cbab17aef0..f3ff05e0337 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -36,7 +36,12 @@ Next, `npm run develop` to start the test server to view your changes. The Gatsby server will be started on port 8000. You can navigate to `http://localhost:8000` to view the site live. -**For best results use npm 8** +In order to cut down on the time it takes `npm run develop` to complete, you can +use the environment variable `GATSBY_PARTIAL_CONTENT` to only build some pages. +For example, if the only pages you need to test locally are in `/cli/v10/commands`, +then you can run the site locally with `GATSBY_PARTIAL_CONTENT=cli/v10/commands npm run develop`. + +**For best results use Node 18 and npm 9+** **Gatsby will watch your filesystem looking for updates.** Any content changes you make should be reflected in the site immediately. diff --git a/scripts/template-oss/index.js b/scripts/template-oss/index.js index fb92029a2d1..f04895ae654 100644 --- a/scripts/template-oss/index.js +++ b/scripts/template-oss/index.js @@ -35,5 +35,6 @@ module.exports = { '/gatsby-*.js', '/CONTRIBUTING.md', '/CONTENT-MODEL.md', + '/.nvmrc', ], }