Create a banner comment from package data.
A command line interface to add relevant information to your source code from package data. This lib reads the package.json
files, then a banner is generated based on each of these values: name
, version
, homepage
, year
, author
and license
.
Install with npm
$ npm install banner-cli
Install with Yarn
$ yarn add banner-cli
Run with npx (without installing)
$ npx banner-cli
Note: Install this npm package with -g
to global use or with -D
to add the package as a devDependency in the package.json
file of your project.
Note: Glob support is truth. Find files using the patterns the shell uses, like stars and stuff.
$ banner-cli dist/**/*.css
from package.json
data:
{
"name": "milligram",
"version": "1.4.0",
"homepage": "https://milligram.io",
"license": "MIT",
"author": "CJ Patoilo <cjpatoilo@gmail.com>"
}
to add a banner comment:
/*!
* Milligram v1.4.0
* https://milligram.io
*
* Copyright (c) 2020 CJ Patoilo
* Licensed under the MIT license
*/
$ banner-cli --help
Usage:
$ banner-cli <files> [<options>]
Options:
-n, --name Define project name
-t, --tag Define tag version
-s, --site Define homepage
-a, --author Define author
-y, --year Define year
-l, --license Define license
-h, --help Display help information
-v, --version Output version
Examples:
$ banner-cli dist/**/*.js
$ banner-cli dist/**/*.css --author 'CJ Patoilo' --license MIT --site https://milligram.io
Want to contribute? Follow these recommendations.
Designed with ♥ by CJ Patoilo. Licensed under the MIT License.