feat(build watch)

- watch for file changes, rebuild docs
- update README.md to show new workflow
This commit is contained in:
John Biundo
2019-08-24 08:36:04 -07:00
parent 052d7f4831
commit dcee955a57
4 changed files with 1154 additions and 57 deletions

View File

@@ -27,9 +27,9 @@
## Description
This project is built on top of [Angular CLI](https://github.com/angular/angular-cli). Repository contains [docs.nestjs.com](https://docs.nestjs.com) source code, the official Nest documentation.
This project is built on top of the [Angular CLI](https://github.com/angular/angular-cli). It uses the [Dgeni documentation generator](https://github.com/angular/dgeni) to compile source documentation in markdown format into the published format. The Repository contains [docs.nestjs.com](https://docs.nestjs.com) source code, the official Nest documentation.
## Developing
## Installing
Install project dependencies and start a local server with the following terminal commands:
@@ -40,11 +40,15 @@ $ npm run start
Navigate to [`http://localhost:4200/`](http://localhost:4200/).
All pages are written in [markdown](https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet) and located in the `content` directory. Run `npm run markdown:watch` to compile them to HTML files on file change.
All pages are written in [markdown](https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet) and located in the `content` directory.
## Build
Run `npm run build` to build the project. The build artifacts will be stored in the `dist/` directory. Use `npm run build:prod` for a production build.
Run `npm run build` to build the project. The build artifacts will be stored in the `dist/` directory.
To run build in _watch mode_, run `npm run build:watch`. Any content changes will be recompiled and rebuilt, and the content served at [`http://localhost:4200/`](http://localhost:4200/).
Use `npm run build:prod` for a production build.
## Support
@@ -58,4 +62,4 @@ Nest is an MIT-licensed open source project. It can grow thanks to the sponsors
## License
Nest is [MIT licensed](LICENSE).
Nest is [MIT licensed](LICENSE).

5
nodemon.json Normal file
View File

@@ -0,0 +1,5 @@
{
"watch": ["content"],
"ext": "md",
"exec": "npm run docs"
}

1189
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -6,8 +6,10 @@
"ng": "ng",
"prestart": "npm run docs",
"start": "ng serve --source-map=false",
"start:watch": "ng serve --source-map=false --watch",
"prebuild": "npm run docs",
"build": "ng build --deleteOutputPath=false",
"build:watch": "concurrently \"nodemon --config nodemon.json\" \"npm run start:watch\"",
"prebuild:prod": "npm run docs",
"build:prod": "ng build --prod --aot --deleteOutputPath=false",
"test": "ng test",
@@ -46,6 +48,7 @@
"ng2-progressbar": "1.3.0",
"ngx-markdown": "8.1.0",
"ngx-perfect-scrollbar": "8.0.0",
"nodemon": "^1.19.1",
"prismjs": "1.17.1",
"rxjs": "6.5.2",
"rxjs-compat": "6.5.2",