git-tag
Version:
simply command 'git tag' wrapper
79 lines (60 loc) • 1.6 kB
Markdown
[![NPM Version][npm-image]][npm-url]
[![NPM Downloads][downloads-image]][downloads-url]
[![Build Status][travis-image]][travis-url]
```
npm install git-tag
```
```javascript
var gitTag = require('git-tag')({localOnly:true,dir:'/path/to/git/.git'})
```
```javascript
gitTag.create('0.0.2015', 'just a message', function(res){
console.log(res) // >> 0.0.2015
})
gitTag.create('0.0.2015', 'just a message', function(err, res){
console.log(err, res) // >> null, 0.0.2015
})
```
```javascript
gitTag.remove('0.0.2015', function(res){
console.log(res) // >> 0.0.2015
})
gitTag.remove('0.0.2015', function(err, res){
console.log(err, res) // >> null, 0.0.2015
})
```
```javascript
gitTag.latest(function(res){
console.log(res) // >> 0.0.2015
})
gitTag.latest(function(err, res){
console.log(err, res) // >> null, 0.0.2015
})
```
```javascript
gitTag.all(function(res){
console.log(res) // >> ['0.0.2015']
})
gitTag.all("--merged", function(err, res){
console.log(err, res) // >> null, ['0.0.2015']
})
```
```
npm test
```
[](LICENSE)
[]: https://img.shields.io/npm/v/git-tag.svg?style=flat
[]: https://npmjs.org/package/git-tag
[]: https://travis-ci.org/cutsin/git-tag.svg
[]: https://travis-ci.org/cutsin/git-tag
[]: https://img.shields.io/npm/dm/git-tag.svg?style=flat
[]: https://npmjs.org/package/git-tag