Get Started Developing the Docs-Kit
Setup
Install the dependencies (uses yarn workspaces):
$ yarn
Testing
To run the tests:
$ yarn test# or$ yarn test:watch
Build the packages
$ yarn build
Start Test Websites
Two websites hosted in this repository serve as the target if e2e and visual regression tests.
Start the docs-smoke-test website:
$ cd websites/docs-smoke-test$ yarn start
Start the api-docs-smoke-test website:
$ cd websites/api-docs-smoke-test$ yarn start
When building a production or test site, setting an environment variable ANALYZE_BUNDLE=true
starts a webpack-bundle-analyzer 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.