chlog-to-html-list

0.0.4 • Public • Published

npm-chlog-to-html-list

Changelog to html list, for embedding it to your html.

Announcements

Preparing, don't use yet.

Requirements

Installation

Install it as devDependencies.

npm install --save-dev npm-chlog-to-html-list

Usage

  1. Create a Node.js file, require the module.(No need to Instantiate)

  2. Call getList method.

    1. Set option as an object "{}".

    2. Give options as key-value pairs.

  3. Run the script and use the acquired list for your html pages.

Blueprint

A very simple blueprint of yoru script may be as below:

 //load the module
 var lister = require("chlog-to-html-list");

 //give options as an object
 var list = lister.getList({
    changelog_path:"path_to_changelog.md" 
 });

 //embed the generated list to your html page now.

Options

Available options are as follows:

General options

key type default description
verbose boolean true Whether to show console outputs during the process.

Options for Paths

key type default description
changelog_path string "CHANGELOG.md" Path to the changelog file(from the root path).
package_json_path string "package.json" Path to the package.json file(from the root path).

Options for html outputs

key type default description
list_id string "changelog-list" The id of the list(list_type).
list_class string "changelog-list" The class name of the list(list_type).
list_type string "ul" The list type of the most outer element of the output html.

Seeing log

By default the option "verbose" is set to true. You could also get logs as an array so that you can store them if you want to. To get the log, just call the "getLog()" method. Note that an empty log will be returnedd when you call "getLog()" before calling "getList" method. example:

var logs = lister.getLog();

Roadmap

Everything should be fine by 1.0.0. No further development is being planned.

There can be some updates related to:

  • dependency updates
  • language udpates
  • updates on changelog schemes.

Changes

  • 0.0.4
    2020-04-18
    Changed
  • 0.0.3
    2020-04-18
    Changed
    preferGlobal set to false
    "getlist unsuccessfully ended" message bug fix.
  • 0.0.2
    2020-04-18
    Added
    LICENSE file
    Changed
    removing unnecessary files
    typo fixes on file names
    readme update
  • 0.0.1
    Added
    added this CHANGELOG.md
    class option of html
    Changed
    changing package description
    getList can now take changelog_path as absolute path
    some parsing bug fixes
    some typo fixes
  • 0.0.0
    Changed
    initial commit

Readme

Keywords

Package Sidebar

Install

npm i chlog-to-html-list

Weekly Downloads

0

Version

0.0.4

License

MIT

Unpacked Size

31.5 kB

Total Files

32

Last publish

Collaborators

  • ac34