An open API service indexing awesome lists of open source software.

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.

Awesome Lists containing this project

README

          

# Rollup plugin add git msg [![NPM version](https://img.shields.io/npm/v/rollup-plugin-add-git-msg?style=flat-square)](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)