<img src=https://centerkey.com/graphics/center-key-logo.svg align=right width=200 alt=logo>
Adds a header comment to a file and saves it to your distribution folder
add-dist-header uses the name
, repository
, and license
from your
project's package.json file to create a header comment.
Example header comment:
1) Setup
Install
Install package for node:
$ npm install --save-dev add-dist-header
2) Usage
Call add-dist-header
from the "scripts"
section of your package.json file.
For example:
"scripts": {
"add-headers": "add-dist-header build dist"
},
Or, run from the terminal in your project home folder, such as:
$ ls package.json
package.json
$ npx add-dist-header "build" "dist"
[add-dist-header] dist/my-app.d.ts ~ length: 413
[add-dist-header] dist/my-app.js ~ length: 1569
The parameters are optional:
$ npx add-dist-header
[add-dist-header] dist/my-app.d.ts ~ length: 413
[add-dist-header] dist/my-app.js ~ length: 1569
$ npx add-dist-header "target/my-app-cli.js"
[add-dist-header] dist/my-app-cli.js ~ length: 413