-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
explain all final NPM scripts in docs
- Loading branch information
Jonas Verhoelen
committed
May 5, 2019
1 parent
4bb8f97
commit ae39ad9
Showing
1 changed file
with
11 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,17 @@ | ||
## 05 – Frontend, Isomorphic Bundles, Hot Reloading & more | ||
|
||
This branch introduces a lot of new NPM scripts and tools (webpack, nodemon, isomorphic-loader, awesome-typescript-loader, core-js and some more) to the codebase that will be used during the development flow. Use them as follows: | ||
This branch introduces a lot of new NPM scripts and tools (webpack, nodemon, isomorphic-loader, awesome-typescript-loader, core-js and some more) to the codebase that will be used during the development flow. Use them as followed: | ||
|
||
1. `npm start` – Got re-defined; it now runs the backend in hot-reloading mode using nodemon. Make changes and the server will quickly re-start. | ||
2. `npm run server` – Will do the old start-script. It just starts the server application without hot-reloading. | ||
1. `npm start` – Changed! It now uses nodemon to run `npm run server` and listens to source code changes. On changes it restarts. | ||
2. `npm run server` – This is the previous `npm start`, not ran by `npm start`. Uses `ts-node` to "directly run" the server entrypoint file. | ||
3. `npm run build:client` – It does the Webpack build for the frontend | ||
4. `npm run build:server` – Creates the build of the whole application inside `./lib` using the TypeScript compiler (`tsc`) | ||
5. `npm run build` – Combines `npm run build:client` and `npm run build:server` for a complete build of the application. | ||
|
||
And the other NPM scripts being available at this point: | ||
|
||
1. `npm run prettier:check` and `prettier:write` checks and fixes linting issues using [Prettier](https://prettier.io/) | ||
2. `npm run test:unit` runs unit tests (`/**/*Spec.ts`) using Mocha | ||
3. `npm run test:integration` runs integration tests (`test/integration/**/*Test.ts`) using Mocha | ||
4. `npm run test` runs Prettier check, unit as well as integration tests in sequence | ||
5. `npm run client:statistics` uses [webpack-bundle-analyzer](https://www.npmjs.com/package/webpack-bundle-analyzer) to visualise the weight of code and dependencies of the application |