Refactor readme and npm scripts.
This commit is contained in:
parent
d1563092b2
commit
156f9d1875
@ -10,7 +10,7 @@ Run `npm install -g @angular/cli` to install the angular CLI.
|
|||||||
|
|
||||||
## Development server
|
## Development server
|
||||||
|
|
||||||
Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The app will automatically reload if you change any of the source files.
|
Run `npm run start:dev` for a dev server. Navigate to `http://localhost:4200/`. The app will automatically reload if you change any of the source files.
|
||||||
|
|
||||||
## Code scaffolding
|
## Code scaffolding
|
||||||
|
|
||||||
@ -22,11 +22,11 @@ Run `ng generate module module-name --route module-name --module app.module` to
|
|||||||
|
|
||||||
## Build
|
## Build
|
||||||
|
|
||||||
Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory. Use the `--prod` flag for a production build.
|
Run `npm run build:dev` to build the project. The build artifacts will be stored in the `dist/` directory. Use the `build:prod` script for a production build.
|
||||||
|
|
||||||
## Running unit tests
|
## Running unit tests
|
||||||
|
|
||||||
Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io).
|
Run `npm run test:dev` to execute the unit tests via [Karma](https://karma-runner.github.io).
|
||||||
|
|
||||||
## Running end-to-end tests
|
## Running end-to-end tests
|
||||||
|
|
||||||
@ -34,8 +34,9 @@ Run `ng e2e` to execute the end-to-end tests via [Protractor](http://www.protrac
|
|||||||
|
|
||||||
## Environment variables
|
## Environment variables
|
||||||
|
|
||||||
Environment variables are contained in the directory `src/environments/`
|
Environment variables are contained in the `.env` file. See `.env.example` for a template.
|
||||||
|
|
||||||
|
Once loaded they will be populated in the directory `src/environments/`.
|
||||||
It contains environment variables for development on `environment.ts` and production on `environment.prod.ts`.
|
It contains environment variables for development on `environment.ts` and production on `environment.prod.ts`.
|
||||||
|
|
||||||
## Further help
|
## Further help
|
||||||
|
15
package.json
15
package.json
@ -3,13 +3,14 @@
|
|||||||
"version": "0.0.0",
|
"version": "0.0.0",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"ng": "ng",
|
"ng": "ng",
|
||||||
"config": "ts-node set-env.ts",
|
"config:dev": "ts-node set-env.ts --environment=dev",
|
||||||
"start:dev": "npm run config --environment=dev && ng serve",
|
"config:prod": "ts-node set-env.ts --environment=prod",
|
||||||
"start:prod": "npm run config --environment=prod && ng serve",
|
"start:dev": "npm run config:dev && ng serve",
|
||||||
"build:dev": "npm run config --environment=dev && ng build",
|
"start:prod": "npm run config:prod && ng serve",
|
||||||
"build:prod": "npm run config --environment=prod && ng build --prod",
|
"build:dev": "npm run config:dev && ng build",
|
||||||
"test:dev": "npm run config --environment=dev && ng test",
|
"build:prod": "npm run config:prod && ng build --prod",
|
||||||
"test:prod": "npm run config --environment=prod && ng test",
|
"test:dev": "npm run config:dev && ng test",
|
||||||
|
"test:prod": "npm run config:prod && ng test",
|
||||||
"lint": "ng lint",
|
"lint": "ng lint",
|
||||||
"e2e": "ng e2e",
|
"e2e": "ng e2e",
|
||||||
"postinstall": "node patch-webpack.js"
|
"postinstall": "node patch-webpack.js"
|
||||||
|
Loading…
Reference in New Issue
Block a user