Skip to content

Commit

Permalink
Add gulp watch task for docs (#5724)
Browse files Browse the repository at this point in the history
gulp docs --watch
  • Loading branch information
wuweiweiwu authored and simonbrunel committed Sep 9, 2018
1 parent 3830216 commit 1aa54b0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions docs/developers/contributing.md
Expand Up @@ -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).
Expand Down
2 changes: 1 addition & 1 deletion gulpfile.js
Expand Up @@ -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(() => {
Expand Down

0 comments on commit 1aa54b0

Please sign in to comment.