https://github.com/cjpatoilo/banner-cli
Create a banner comment from package data.
https://github.com/cjpatoilo/banner-cli
banner banner-comment cli npm
Last synced: 7 months ago
JSON representation
Create a banner comment from package data.
- Host: GitHub
- URL: https://github.com/cjpatoilo/banner-cli
- Owner: cjpatoilo
- License: mit
- Created: 2016-11-30T20:33:48.000Z (almost 9 years ago)
- Default Branch: main
- Last Pushed: 2023-02-27T01:21:13.000Z (over 2 years ago)
- Last Synced: 2025-02-27T05:51:31.823Z (7 months ago)
- Topics: banner, banner-comment, cli, npm
- Language: JavaScript
- Homepage: https://cjpatoilo.com/banner-cli
- Size: 496 KB
- Stars: 54
- Watchers: 2
- Forks: 8
- Open Issues: 4
-
Metadata Files:
- Readme: readme.md
- Contributing: .github/contributing.md
- Funding: .github/funding.yml
- License: license
Awesome Lists containing this project
README
> Create a banner comment from package data.
[](https://travis-ci.org/cjpatoilo/banner-cli?branch=master)
[](https://ci.appveyor.com/project/cjpatoilo/banner-cli)
[](https://www.codacy.com/app/cjpatoilo/banner-cli/dashboard)
[](https://david-dm.org/cjpatoilo/banner-cli)
[](https://www.npmjs.com/package/banner-cli)
[](https://www.npmjs.com/package/banner-cli)
[](https://gitter.im/cjpatoilo/banner-cli)## Why it's awesome
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`.
## Getting Started
**Install with npm**
```bash
$ npm install banner-cli
```**Install with Yarn**
```bash
$ yarn add banner-cli
```Run with npx (without installing)
```bash
$ 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._
## Usage
_Note: Glob support is truth. Find files using the patterns the shell uses, like stars and stuff._
```bash
$ banner-cli dist/**/*.css
```from `package.json` data:
```json
{
"name": "milligram",
"version": "1.4.0",
"homepage": "https://milligram.io",
"license": "MIT",
"author": "CJ Patoilo "
}
```to add a banner comment:
```js
/*!
* Milligram v1.4.0
* https://milligram.io
*
* Copyright (c) 2020 CJ Patoilo
* Licensed under the MIT license
*/
```## CLI
```bash
$ banner-cli --helpUsage:
$ banner-cli []
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 versionExamples:
$ banner-cli dist/**/*.js
$ banner-cli dist/**/*.css --author 'CJ Patoilo' --license MIT --site https://milligram.io```
## Contributing
Want to contribute? Follow these [recommendations](https://github.com/cjpatoilo/banner-cli/contribute).
## License
Designed with ♥ by [CJ Patoilo](https://twitter.com/cjpatoilo). Licensed under the [MIT License](https://cjpatoilo.com/license).