ximg
v1.0.5
Published
readme-md ========= [![npm Version][NPM VERSION BADGE]][NPM PAGE] [![Node.js][NODE VERSION BADGE]][NODE PAGE] [![GitHub License][LICENSE BADGE]][LICENSE PAGE] [![CI Status][CI BADGE]][CI PAGE]
Downloads
1
Readme
readme-md
A README.md
generator library.
Install
yarn add readme-md # Or alternatively: `npm install --save readme-md`
Usage
import readme from 'readme-md';
const pkg = {
name: 'my-awesome-package',
description: 'An awesome package.',
license: 'MIT',
scripts: {
test: 'jest'
}
};
const additionalSections = [
{
position: 'after:Install',
title: 'Usage',
body: "```js\nimport myAwesomePackage from 'my-awesome-package';\n\nmyAwesomePackage({ awesome: 'parameters' });\n```"
}
];
readme({ pkg, additionalSections });
// > my-awesome-package
// > ==================
// > An awesome package.
// >
// > Install
// > -------
// > ```sh
// > npm install my-awesome-package
// > ```
// >
// > Usage
// > -----
// > ```js
// > import myAwesomePackage from 'my-awesome-package';
// >
// > myAwesomePackage({ awesome: 'parameters' });
// > ```
// >
// > Testing
// > -------
// > ```sh
// > npm test
// > ```
// >
// > License
// > -------
// > The MIT License. See the license file for details.
NOTE: This is a pure ESM package. See here for details.
Testing
yarn test # Or alternatively: `npm test`
See Also
License
The MIT License. See the license file for details.