This document lists commands that commonly used during development.
Note that if you are running in the Docker environment, you should prefix any npm commands with docker-compose run --rm app
.
$ npm run start
In the Docker environment, launch the Docker service instead:
$ docker-compose up app
$ npm run build
$ npm run storybook
In the Docker environment, launch the Docker service instead:
$ docker-compose up storybook
$ npm install
You may need to rerun this command if the dependencies have been changed since the last time you installed them.
# Run this to automatically fix lint issues
$ npm run lint:fix
There are six variants of the command in case if you want to run something more specific. The commands are:
lint:fix
- Automatically fix CSS, TypeScript, and JavaScript lint issues. Note that
if an error is encountered in CSS, it will not run the TypeScript/JavaScript lint checks.lint
- Check, but do not fix, both CSS, TypeScript, and JavaScript lint issuesstylelint:fix
- Automatically fix CSS lint issuesstylelint
- Check, but do not fix, CSS lint issuestsc
- Run the TypeScript compiler (tsc
) to check for type errorseslint:fix
- Automatically fix JavaScript lint issueseslint
- Check, but do not fix, JavaScript lint issues$ npm run test
This command will currently run the Storybook StoryShots tests in render-only mode. We do this just to get basic testing for things like prop-types checking for all Storybook stories than using the actual snapshot testing functionality.