-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Now, gulp build task with the flag --with-docs will: * generate docs in build/docs by running npm run yuidoc * copy build/docs to build/dist/docs
- Loading branch information
Showing
4 changed files
with
66 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
'use strict'; | ||
|
||
import gulp from 'gulp'; | ||
import {exec} from 'child_process'; | ||
|
||
import paths from '../paths'; | ||
|
||
/** | ||
* This task simply encapsulate the npm task `npm run yuidoc` | ||
* so that it could be integrated in the `gulp build --with-docs` workflow | ||
*/ | ||
gulp.task('generate-docs', (cb) => { | ||
return exec('npm run yuidoc', (error, stdout, stderr) => { | ||
console.log('stdout: ' + stdout); | ||
console.log('stderr: ' + stderr); | ||
if (error !== null) { | ||
console.log('exec error: ' + error); | ||
} | ||
cb(); | ||
}); | ||
}); | ||
|
||
/** | ||
* This task simply copies generated docs from `build/docs` to `build/dist/docs` | ||
* `build/docs` must have been generated before | ||
*/ | ||
gulp.task('copy-generated-docs', () => { | ||
return gulp.src(paths.build.docs + '**/*') | ||
.pipe(gulp.dest(paths.build.dist.docs)); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters