-
Notifications
You must be signed in to change notification settings - Fork 11.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Generate jsdocs #5824
Generate jsdocs #5824
Conversation
If we generate JSDocs, should we serve them from somewhere? |
f3f3b97
to
35ef37d
Compare
@etimberg Yes, good idea. I added them to the left nav menu ( |
68523bc
to
3642e53
Compare
I wanted to see how these look like. To build, I changed docsTask to following: function docsTask(done) {
var bin = 'gitbook-cli/bin/gitbook.js';
var cmd = argv.watch ? 'serve' : 'build';
return run(bin, ['install', './'])
.then(() => run(bin, [cmd, './', './dist/docs']))
.then(() => {
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));
});
} And here's a example page from the generated docs (printed as pdf to be attachable here): A lot of documentation is missing from code to build releaseable documentation. I think |
Thanks @kurkle. I've rebased against master using the code you provided I'm not sure that it's an issue to generate jsdocs for APIs that don't have much documentation yet because I think it may spur contributors to help fill in the missing docs |
Should we go ahead and try this out? |
Am happy to try these out |
Closes #5821
This PR generates jsdocs that we can link to from the docs to add missing docs as suggested by @jukra