CLI & Scaffolding
Cleaning
yarn cleanAndSetupRemoves the example app, replacing it with the smallest amount of boilerplate code necessary to start writing your app! Also, it makes some essential changes to your setup to give you a clean and working start.
Note: This command is self-destructive; once you've run it, it disables itself. This action is for your safety, so you can't irreversibly delete portions of your project by accident.
Generators
yarn generateAllows you to auto-generate boilerplate code for common parts of your application, specifically components, and redux-toolkit slices. You can also run yarn generate <part> to skip the first selection (e.g., yarn generate component).
yarn test:generatorsTest whether the generators are working fine. It generates components and slices with a variety of settings. This command is helpful if you decide to customize generators for your needs.
Production
yarn start:prodBuilds your app (see
yarn run build)Serves the
buildfolder locally
The app is built for optimal performance; assets are minified and served gzip-ed.
Unit testing
yarn testUnit tests specified in the **/__tests__/*.ts files throughout the application are run.
All the test commands allow an optional -- [string] argument to filter the tests run by Jest, useful if you need to run a specific test only.
# Run only the Button component tests
yarn test -- ButtonLinting
yarn lintLints your Typescript and your CSS.
yarn lint:fixLints your code and tries to fix any errors it finds.
Extracting translation JSON Files
yarn extract-messagesTypescript
yarn checkTsChecks for TypeScript errors.
Last updated
Was this helpful?