1.1.2 • Published 4 years ago
markdown-magic-version-badge v1.1.2
Version badge plugin
Add version badge to markdown files via markdown-magic
Install
npm i markdown-magic markdown-magic-version-badge --save-devAdding the plugin
See example.js for usage.
const fs = require('fs');
const path = require('path');
const markdownMagic = require('markdown-magic');
const config = {
transforms: {
VERSIONBADGE: require('./index.js'),
}
}
const markdownPath = path.join(__dirname, 'README.md');
markdownMagic(markdownPath, config);Usage in markdown
Options
- pkg (nearest
package.jsonfile in file tree from the README by default) - path to closest pkg - link (links to npm by default) - a URL to link the button to (set to
falseto prevent link) - prefix (
npmby default) - the prefix for the badge - color (
greenby default ororangeif pre-release version) - any supported color