Skip to content

Commit

Permalink
Generate jsdocs
Browse files Browse the repository at this point in the history
  • Loading branch information
benmccann committed Nov 17, 2018
1 parent ecf64d3 commit 35ef37d
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
1 change: 1 addition & 0 deletions docs/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
* [Styling](axes/styling.md)
* [Developers](developers/README.md)
* [Chart.js API](developers/api.md)
* [JSDoc](jsdoc/index.html)
* [Updating Charts](developers/updates.md)
* [Plugins](developers/plugins.md)
* [New Charts](developers/charts.md)
Expand Down
12 changes: 10 additions & 2 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ var connect = require('gulp-connect');
var eslint = require('gulp-eslint');
var file = require('gulp-file');
var insert = require('gulp-insert');
var jsdoc = require('gulp-jsdoc3');
var replace = require('gulp-replace');
var size = require('gulp-size');
var streamify = require('gulp-streamify');
Expand Down Expand Up @@ -192,10 +193,17 @@ function docsTask(done) {
exec([cmd, script, 'install', './'].join(' ')).then(() => {
return exec([cmd, script, argv.watch ? 'serve' : 'build', './', './dist/docs'].join(' '));
}).then(() => {
done();
var config = {
opts: {
destination: './dist/docs/jsdoc'
},
recurse: true
};
gulp.src(['./src/**/*.js'], {read: false})
.pipe(jsdoc(config, done));
}).catch((err) => {
done(new Error(err.stdout || err));
})
});
}

function unittestTask(done) {
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
"gulp-file": "^0.3.0",
"gulp-htmllint": "^0.0.15",
"gulp-insert": "~0.5.0",
"gulp-jsdoc3": "^2.0.0",
"gulp-replace": "^0.6.1",
"gulp-size": "~2.1.0",
"gulp-streamify": "^1.0.2",
Expand Down

0 comments on commit 35ef37d

Please sign in to comment.