module-header
v0.5.0
Published
Adds an auto-generated header to your module files
Downloads
112
Maintainers
Readme
module-header
A tool that generates an info header from your module's package.json and prepends it to the given file(s).
Install
$ npm install --save-dev module-header
Usage
const header = require('module-header');
const pkg = require('./package.json')
header('dist/**/*.js', pkg)
// optionally pass your custom template string:
// header('*.js', pkg, `-- ${pkg.name} --`)
.then(...)
.catch(...);
CLI
$ npm install --global module-header
Usage:
$ header <file-glob(s)>
Example:
$ header dist/**/* src/*.js