Commands
These are NPM or Yarn commands, which means they’re all visible in package.json
.
Local server
Build and start the local dev server:
# Generate artifacts
yarn run build
# Start PWA server
yarn run watch:venia
# Start PWA server with storefront hot-reloading and concurrent Buildpack/Peregrine rebuilds
yarn run watch:all
Code standards
# Lint JavaScript
yarn run lint
# List files different from Prettier formatting.
# Used in a CI pipeline to pipe output ahead on failure.
yarn run prettier:check
# List files different from Prettier formatting.
# Used in a pre-push Git hook to fail on error.
yarn run prettier:validate
# Write Prettier fixes to all files
yarn run prettier
GraphQL
# Validate GraphQL schemas and queries
yarn run validate-queries
Component library
# Start Storybook server
yarn run storybook:venia
Unit tests
# Start Jest tests for JavaScript
yarn run test