Skip to content

How to use with gulp

Lloyd Brookes edited this page Aug 10, 2016 · 10 revisions

1. Install jsdoc2md in your project

$ npm i jsdoc-to-markdown --save-dev

2. Add a simple task to your gulpfile.js

gulp.task('docs', function () {
  const fs = require('fs')
  const jsdoc2md = require('jsdoc-to-markdown')

  return jsdoc2md.render({ files: 'lib/*.js' })
    .then(output => fs.writeFileSync('docs/api.md', output))
})
Clone this wiki locally