https://github.com/oplinjie/rollup-plugin-add-git-msg
Simple rollup plugin that insert GIT_TAG and COMMITHASH in banner.
https://github.com/oplinjie/rollup-plugin-add-git-msg
git plugin rollup version
Last synced: about 2 months ago
JSON representation
Simple rollup plugin that insert GIT_TAG and COMMITHASH in banner.
- Host: GitHub
- URL: https://github.com/oplinjie/rollup-plugin-add-git-msg
- Owner: oplinjie
- Created: 2017-05-15T08:34:53.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2019-11-25T12:21:33.000Z (over 6 years ago)
- Last Synced: 2025-03-02T14:17:50.381Z (over 1 year ago)
- Topics: git, plugin, rollup, version
- Language: JavaScript
- Homepage:
- Size: 6.84 KB
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Rollup plugin add git msg [](https://www.npmjs.com/package/rollup-plugin-add-git-msg)
Will add a comment to the start of the transpiled code.
A standard Comment Header contains:
- Current repo name from `package.json` and last git commit / git tag from git command.
- The copyright of the repo.
- Date of compiled time.
Example header:
```javascript
/*!
* ${rollup-plugin-add-git-msg} v1.0-${126f2767e370ed3593ad8d7b9e3b924d54515b24}
*
* Copyright 2017 by oplinjie
*
* Date: 2017-05-15
*/
```
## Installation
```bash
$ npm install --save-dev rollup-plugin-add-git-msg
```
## Usage
Add plugin to your rollup configuration:
```javascript
import addGitMsg from 'rollup-plugin-add-git-msg';
module.exports = {
plugins: [
addGitMsg({ 'copyright': 'oplinjie' })
]
}
```
## Plugin Options
- `showDate` Default value: `true`
- `showTag` Default value: `true`
- `showCommitID` Default value: `true`
- `copyright` Default value: `null`
## License
MIT License (MIT)