adjust-md-for-publish

1.0.0 • Public • Published

adjust-md-for-publish

Version npm Dependencies Known Vulnerabilities License

This is a tool to adjust markdown document for publishing npm package, such as removing some section out from the destination document

Usage

const adjustMD = require('adjust-md-for-publish');
 
adjustMD({
  filename: 'README.md',
  destname: 'dist/README.md',
  filterSection: ['CHANGELOG', 'References']
});

The above code runs in the simulation that README.md needs to be copied to the dist directory for publishing npm package and some chapters (example means CHANGELOG and References) needs to be removed out. The result is as follows.

original README.md content:

# Title

> This is description

## Section 1

xxxxxxxxxxxxxxxx

## CHANGELOG

changelog link here

## References

1. reference link 1
1. reference link 2

## License

MIT

adjust README.md content:

# Title

> This is description

## Section 1

xxxxxxxxxxxxxxxx

## License

MIT

License

MIT

Package Sidebar

Install

npm i adjust-md-for-publish

Weekly Downloads

6

Version

1.0.0

License

MIT

Unpacked Size

5.06 kB

Total Files

3

Last publish

Collaborators

  • johvin