Skip to content

Releases: jsdoc2md/dmd

v6.2.0

28 Nov 14:06
Compare
Choose a tag to compare

Minor updates

  • Upgrade to marked v4.2.3
  • Upgrade deps, dates and tested Node versions in CI

v2.0.3

07 Oct 09:34
Compare
Choose a tag to compare

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.