JSPM

@lmc-eu/conventional-changelog-lmc

2.0.4
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 212
  • Score
    100M100P100Q99433F
  • License MIT

conventional-changelog LMC parser and writer

Package Exports

  • @lmc-eu/conventional-changelog-lmc
  • @lmc-eu/conventional-changelog-lmc/src/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@lmc-eu/conventional-changelog-lmc) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

@lmc-eu/conventional-changelog-lmc

LMC’s Conventional Changelog Writer and Parser

Installation

NPM:

npm i --dev @lmc-eu/conventional-changelog-lmc

Yarn:

yarn add --dev @lmc-eu/conventional-changelog-lmc

Usage

const { readFile } = require('fs').promises;
const { resolve } = require('path');
const { parserOpts, writerOpts } = require('@lmc-eu/conventional-changelog-lmc');

module.exports = Promise.all([
  readFile(resolve(__dirname, 'templates/template.hbs'), 'utf-8'),
  readFile(resolve(__dirname, 'templates/header.hbs'), 'utf-8'),
  readFile(resolve(__dirname, 'templates/commit.hbs'), 'utf-8'),
  readFile(resolve(__dirname, 'templates/footer.hbs'), 'utf-8'),
]).then(([template, header, commit, footer]) => {
  writerOpts.mainTemplate = template;
  writerOpts.headerPartial = header;
  writerOpts.commitPartial = commit;
  writerOpts.footerPartial = footer;

  return {
    parserOpts,
    writerOpts,
  };
});