Skip to main content

Available scripts

The following table describes script executing throughout development, or inside CI/CD processes.

ScriptDescriptionCICD
Workflow
devInitiates the application at http://localhost:3000.
buildBuilds the application.
postbuildCreates static site-map.
startServes the built application.
secretsInitiates git-crypt and install secrets.
Storybook
storybookLocally launches Storybook to develop React Component in isolation.
storybook:buildBuilds up the Storybook library which then can be hosted somewhere and be accessible to the team.
Code generation
codegen:graphql(Shortcut) Executes all GraphQL based code generation.
codegen:graphql:datoExecutes DatoCMS based code generation.
codegen:graphql:localExecutes local GraphQL based code generation. Use this when updating .graphql and .gql files before pushing.
codegen:graphql:cleanRemoves all GraphQL based code generation.
codegen:componentGenerates a new component.
Documentation
docs:startInitiates the documentation website.
docs:buildBuilds the documentation website.
docs:clearCleans cache and temporary files of the documentation website.
docs:serveServes the built documentation website.
Code quality
format:fixFormats the codebase using Prettier.
format:validateValidates codebase format using Prettier.
lintValidates codebase style using ESLint.
lint:fixFixes possible code style issues using ESLint.
typecheckValidates codebase typing using TypeScript.
testSwitch command for test:run and test:watch (depending on CI).
test:runExecutes tests once.
test:watchExecutes tests in watch mode.
test:coverageExecutes tests and generates coverage report.
code-quality(Shortcut) Executes all code-quality checks.
Util/Tools
utils:fix-layoutHelper to fix layouts after DatoCMS environment forking.