https://github.com/heldr/headr
Adds header / banner info to a file. Nice to use as npm script :)
https://github.com/heldr/headr
Last synced: about 1 year ago
JSON representation
Adds header / banner info to a file. Nice to use as npm script :)
- Host: GitHub
- URL: https://github.com/heldr/headr
- Owner: heldr
- Created: 2015-10-14T20:24:31.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2016-08-24T21:31:52.000Z (almost 10 years ago)
- Last Synced: 2025-04-10T12:56:50.585Z (about 1 year ago)
- Language: JavaScript
- Homepage:
- Size: 5.86 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-npm-scripts - headr - Add header / banner info to a file. (Other Utilities / Utility Packs)
README
# headr
Adds header / banner info to a file. Nice to use as npm script :)
`npm install -g headr` (it may require Root privileges)
or for npm script:
`npm install --save-dev headr`
## Requirements
- Node.js 4+
## Usage
```CLI
$ headr input.js -o=output.js --version --homepage --license
```
Headr will inspect package.json using **name** and **description** as default, and then generates the following code:
```js
/**
* headr - Add header to a file
*
* @version v0.0.1
* @homepage http://heldr.com
* @license MIT
*/
your code
```
### Custom labels
```CLI
$ headr input.js -o=output.js --homepage="link"
```
```js
/**
* headr - Add header to a file
*
* @link http://heldr.com
*/
your code
```
### Tab spaces
```CLI
$ headr input.js -o=output.js --h-tab-spaces=4
```
## Pipe
```CLI
$ cat input.js | headr -o=output.js --version --homepage --license
```
or:
```CLI
$ cat input.js | headr --version --homepage --license > output.js
```
Just make sure to use a different output file in this case, otherwise `-o` replaces the file nicely :)
## License
MIT License
(c) [Helder Santana](http://heldr.com)