mirror of
https://github.com/microsoft/TypeScript-Node-Starter.git
synced 2025-11-08 14:47:28 +00:00
32
README.md
32
README.md
@@ -287,24 +287,24 @@ You'll notice that npm scripts can call each other which makes it easy to compos
|
||||
Below is a list of all the scripts this template has available:
|
||||
|
||||
|
||||
| Npm Script | Description |
|
||||
| Npm Script | Description |
|
||||
| ------------------------- | ------------------------------------------------------------------------------------------------- |
|
||||
| `start` | Does the same as 'npm run serve'. Can be invoked with `npm start` |
|
||||
| `build` | Full build. Runs ALL build tasks (`build-sass`, `build-ts`, `lint`, `copy-static-assets`) |
|
||||
| `serve` | Runs node on `dist/server.js` which is the apps entry point |
|
||||
| `watch-node` | Runs node with nodemon so the process restarts if it crashes. Used in the main watch task |
|
||||
| `watch` | Runs all watch tasks (TypeScript, Sass, Node). Use this if you're not touching static assets. |
|
||||
| `test` | Runs tests using Jest test runner |
|
||||
| `watch-test` | Runs tests in watch mode |
|
||||
| `build-ts` | Compiles all source `.ts` files to `.js` files in the `dist` folder |
|
||||
| `watch-ts` | Same as `build-ts` but continuously watches `.ts` files and re-compiles when needed |
|
||||
| `build-sass` | Compiles all `.scss` files to `.css` files |
|
||||
| `watch-sass` | Same as `build-sass` but continuously watches `.scss` files and re-compiles when needed |
|
||||
| `lint` | Runs ESLint on project files |
|
||||
| `build-sass` | Compiles all `.scss` files to `.css` files |
|
||||
| `build-ts` | Compiles all source `.ts` files to `.js` files in the `dist` folder |
|
||||
| `build` | Full build. Runs ALL build tasks (`build-sass`, `build-ts`, `lint`, `copy-static-assets`) |
|
||||
| `copy-static-assets` | Calls script that copies JS libs, fonts, and images to dist directory |
|
||||
| `debug` | Performs a full build and then serves the app in watch mode |
|
||||
| `serve-debug` | Runs the app with the --inspect flag |
|
||||
| `watch-debug` | The same as `watch` but includes the --inspect flag so you can attach a debugger |
|
||||
| `lint` | Runs ESLint on project files |
|
||||
| `serve-debug` | Runs the app with the --inspect flag |
|
||||
| `serve` | Runs node on `dist/server.js` which is the apps entry point |
|
||||
| `start` | Does the same as 'npm run serve'. Can be invoked with `npm start` |
|
||||
| `test` | Runs tests using Jest test runner |
|
||||
| `watch-debug` | The same as `watch` but includes the --inspect flag so you can attach a debugger |
|
||||
| `watch-node` | Runs node with nodemon so the process restarts if it crashes. Used in the main watch task |
|
||||
| `watch-sass` | Same as `build-sass` but continuously watches `.scss` files and re-compiles when needed |
|
||||
| `watch-test` | Runs tests in watch mode |
|
||||
| `watch-ts` | Same as `build-ts` but continuously watches `.ts` files and re-compiles when needed |
|
||||
| `watch` | Runs all watch tasks (TypeScript, Sass, Node). Use this if you're not touching static assets. |
|
||||
|
||||
## Type Definition (`.d.ts`) Files
|
||||
TypeScript uses `.d.ts` files to provide types for JavaScript libraries that were not written in TypeScript.
|
||||
@@ -596,7 +596,7 @@ In that file you'll find two sections:
|
||||
| chai | Testing utility library that makes it easier to write tests |
|
||||
| concurrently | Utility that manages multiple concurrent tasks. Used with npm scripts |
|
||||
| jest | Testing library for JavaScript. |
|
||||
| node-sass | Allows to compile .scss files to .css |
|
||||
| sass | Allows to compile .scss files to .css |
|
||||
| nodemon | Utility that automatically restarts node process when it crashes |
|
||||
| supertest | HTTP assertion library. |
|
||||
| ts-jest | A preprocessor with sourcemap support to help use TypeScript with Jest.|
|
||||
|
||||
Reference in New Issue
Block a user