Add gulp watch task for docs (#5724)

gulp docs --watch
This commit is contained in:
Wei-Wei Wu 2018-09-09 11:42:18 -07:00 committed by Simon Brunel
parent 3830216420
commit 1aa54b074b
2 changed files with 2 additions and 1 deletions

View File

@ -37,6 +37,7 @@ The following commands are now available from the repository root:
> gulp lint // perform code linting (ESLint)
> gulp test // perform code linting and run unit tests
> gulp docs // build the documentation in ./dist/docs
> gulp docs --watch // starts the gitbook live reloaded server
```
More information can be found in [gulpfile.js](https://github.com/chartjs/Chart.js/blob/master/gulpfile.js).

View File

@ -190,7 +190,7 @@ function docsTask(done) {
const cmd = process.execPath;
exec([cmd, script, 'install', './'].join(' ')).then(() => {
return exec([cmd, script, 'build', './', './dist/docs'].join(' '));
return exec([cmd, script, argv.watch ? 'serve' : 'build', './', './dist/docs'].join(' '));
}).catch((err) => {
console.error(err.stdout);
}).then(() => {