Get Started Developing the Docs-Kit

Setup
Clipboard icon

Install the dependencies (uses yarn workspaces):

$ yarn
Clipboard icon

Testing
Clipboard icon

To run the tests:

$ yarn test
# or
$ yarn test:watch
Clipboard icon

Build the packages
Clipboard icon

$ yarn build
Clipboard icon

Start Test Websites
Clipboard icon

Two websites hosted in this repository serve as the target if e2e and visual regression tests.

Start the docs-smoke-test website:
Clipboard icon

$ cd websites/docs-smoke-test
$ yarn start
Clipboard icon

Start the api-docs-smoke-test website:
Clipboard icon

$ cd websites/api-docs-smoke-test
$ yarn start
Clipboard icon

When building a production or test site, setting an environment variable ANALYZE_BUNDLE=true starts a webpack-bundle-analyzerExternal link icon based size analysis after the build. Keep in mind that the analysis only covers the JS content, GatsbyJS GraphQL data live in separate JSON files in the /public/page-data folder and are a source of page weight, too. The /public/page-data/sq subfolder contains the static query results.

To analyze memory issues, set an environment variable DEBUG_GATSBY_MEM=true. This forces a GC every second and prints process statistics. Run on uncached builds for more insighful results.

To reduce to the minimum the memory usage in case of local development, set an environment variable LOW_MEM=true. In this way the development server runs in uncached mode.