Skip to content

v2.0.3

Compare
Choose a tag to compare
@75lb 75lb released this 07 Oct 09:34
· 89 commits to master since this release

Breaking since 1.4.2

  • Stream interface removed, the exported function (dmd) is now synchronous.
  • For an async (Promise) method, use dmd.async.
  • cli interface removed, use jsdoc2md instead

Non-breaking changes

  • dependency tree cleaned up
  • merged ddata into the module - no longer makes sense for it to be separate
  • memoisation cache added - repeat invocations with the same input return from cache (much faster).

Migrating to v2

Say your v1 code looked like this:

    const data = [ { ... } ]
    let dmdStream = dmd({
      template: 'blah',
      helper: ['./scripts/helpers']
    });

    dmdStream.pipe(fs.createWriteStream('docs.md')));
    dmdStream.end(JSON.stringify(data));

Then the v2 equivalent would look like:

    const data = [ { ... } ]
    const docs = dmd(data, {
      template: 'blah',
      helper: ['./scripts/helpers']
    });

    fs.writeFile('docs.md', docs);

Thanks to @vvo for the example.