npm run startStarts the development server running on http://localhost:3000
npm run cleanDeletes the example app, replacing it with the smallest amount of boilerplate code necessary to start writing your app!
Note: This command is self-destructive, once you've run it you cannot run it again. This is for your own safety, so you can't delete portions of your project irreversibly by accident.
npm run generateAllows you to auto-generate boilerplate code for common parts of your
application, specifically components, and containers. You can
also run npm run generate <part> to skip the first selection. (e.g. npm run generate container)
npm startStarts the development server and makes your application accessible at
localhost:3000. Tunnels that server with ngrok, which means the website
accessible anywhere! Changes in the application code will be hot-reloaded.
npm run start:production- Runs tests (see
npm test) - Builds your app (see
npm run build) - Starts the production server (see
npm run start:prod)
The app is built for optimal performance: assets are minified and served gzipped.
To change the host and/or port the app is accessible at, pass the --host and/or --port option to the command
with --. E.g. to make the app visible at my-local-hostname:5000, run the following:
npm start -- --host my-local-hostname --port 5000
npm run buildPreps your app for deployment (does not run tests). Optimizes and minifies all files, piping them to the build folder.
Upload the contents of build to your web server to
see your work live!
See the testing documentation for detailed information about our testing setup!
npm testTests your application with the unit tests specified in the **/tests/*.js files
throughout the application.
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
npm test -- Buttonnpm run test:watchWatches changes to your application and re-runs tests whenever a file changes.
npm run start:tunnelStarts the development server and tunnels it with ngrok, making the website
available worldwide. Useful for testing on different devices in different locations!
npm run analyzeThis command will generate a stats.json file from your production build, which
you can upload to the webpack analyzer or Webpack Visualizer. This
analyzer will visualize your dependencies and chunks with detailed statistics
about the bundle size.
npm run lintLints your JavaScript and your CSS.
npm run lint:eslint:fix -- .Lints your code and tries to fix any errors it finds.