@borracciablu/banner-cli v1.0.32
/*!
* [name] v[tag]
* [homepage]
*
* Copyright (c) [year] [author]
* [license]
*/
By default it will use the values in package.json
.
All values are overridable.
If you are evaluating the use of banners please read:
Installing
npm install @borracciablu/banner-cli
API Reference
Usage: banner-cli [options] [source]
CLI tool to add a banner comment to your files.
Arguments:
source Files to bannerize
Options:
-V, --version output the version number
-n, --name <name> override project name
-t, --tag <tag> override tag version
-s, --site <site> override homepage
-a, --author <author> override author
-y, --year <year> override year
--template <template> override template
-l, --license <license> override license
-d, --debug debug options and args
--dry-run test the command, simulate without actually doing it
-h, --help display help for command
Template feature
The --template
option allows you to inject tags.
The avalable tags are:
<br> := new line. Like using \n.
[name] := project name
[tag] := project tag version
[site] := project homepage
[author] := project author
[year] := copyright year
[license] := license
[time] := unix timestamp in seconds
Examples
Basic:
# add banner to each js file
$ banner-cli 'dist/**/*.js'
# add banner to each css file
# override author, license, site
$ banner-cli 'dist/**/*.css' --author 'Mr Developer' --license MIT --site https://project.js.org
# use template
$ banner-cli 'dist/**/*.css' --template '/*! v[tag] :: [time] */'
Advanced:
// in package.json
// inject next tag
{
"scripts" : {
"banner:patch": "NEXT_TAG=$(semver $npm_package_version -i patch) banner-cli 'dist/*.js' --template='/*! v[tag] :: [time] */' --tag=$NEXT_TAG"
}
}
Notes
This package is highly inspired by banner-cli and is currently a superset.
6 months ago
6 months ago
6 months ago
5 months ago
5 months ago
5 months ago
3 months ago
4 months ago
4 months ago
7 months ago
7 months ago
8 months ago
8 months ago
9 months ago
10 months ago
10 months ago
11 months ago
12 months ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
2 years ago
2 years ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
3 years ago
2 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago