-
Notifications
You must be signed in to change notification settings - Fork 13
All npm commands
Marwane Kalam-Alami edited this page Nov 1, 2020
·
1 revision
-
npm start
Launches the server for development. Every TypeScript change will trigger a server restart. (based on ts-node-dev) -
npm run lint
Checks your code for errors, and fixes the most obvious ones. Tip: rungithooks/install.sh
to trigger the lint before your commits instead. -
npm run build:client
andbuild:css
Builds the client Typescript and CSS respectively. Append-- -w
to those for watch mode. They are only useful if you setDEBUG_DISABLE_STARTUP_BUILD: false
for faster launch times.
-
npm run test
Runs all unit + end to end tests. -
npm run test:unit
Runs all unit tests. (based on mocha + chai, more details below) -
npm run test:e2e
Runs all end-to-end tests. (based on cypress) -
npm run start:e2e
Launches the server with a special database for end-to-end testing. More in the Cypress folder readme. -
npm run cypress
Launches Cypress for end-to-end test development.
-
npm run build
Builds the server to JavaScript. -
npm run start:production
Starts JavaScript server. Needs to be built first.
-
npm run start:refresh
Alternative tonpm start
that also refreshes the browser automatically after editing templates/CSS/client-side scripts. (based on tsc + browser-refresh) -
npm run start:debug
Launches the server in debug mode. Prefer using the embedded debugger of your code editor (see example for VSCode further below). -
npm run migrate:latest
Migrate database to latest version. Useful for migration development. (based on knex) -
npm run migrate:rollback
Cancel latest database migration. Useful for migration development. -
npm run migrate:currentVersion
Display current database version. -
npm run docs
Generates the code documentation. (based on typedoc)