{"name":"gulp-tag-version","version":"1.1.0","description":"Tag git repository with current package version","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"keywords":["gulpplugin","git","package.json"],"repository":{"type":"git","url":"http://github.com/ikari-pl/gulp-tag-version.git"},"author":{"name":"Cezar \"ikari\" Pokorski","email":"git@ikari.pl"},"license":"BSD-2-Clause","dependencies":{"map-stream":"~0.1.0","gulp-util":"~2.2.14","gulp-git":"~0.3.6"},"devDependencies":{"gulp-bump":"~0.1.7","gulp-filter":"~0.4.0","gulp-prompt":"~0.1.1","gulp":"~3.6.0","gulp-git":"~0.3.6"},"bugs":{"url":"https://github.com/ikari-pl/gulp-tag-version/issues"},"homepage":"https://github.com/ikari-pl/gulp-tag-version","_id":"gulp-tag-version@1.1.0","dist":{"shasum":"e5cb81094b831060b4d33a857dd71d79a824c736","tarball":"http://registry-npm.ywwl.com/gulp-tag-version/download/gulp-tag-version-1.1.0.tgz","integrity":"sha512-3/iyoYU5XuGzMFjzJ9pM84pI9zPWrUjiQwVHebhcBo5Dd/kIZKOb13v/1FFeNssxYZNUZK+U2GOWRo1porDzDg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBjDq+xMeJz6RwPVhmJsmhh2oLFPh0VxSE2UwGKTuU+gAiARKCxQAfdlqeDKNIMQF/huhLOy7407a1CTGQdpazld2Q=="}],"size":2470,"noattachment":false,"key":"/gulp-tag-version/-/gulp-tag-version-1.1.0.tgz"},"_from":".","_npmVersion":"1.3.14","_npmUser":{"name":"ikari","email":"npm@ikari.pl"},"maintainers":[{"name":"ikari","email":"npm@ikari.pl"}],"directories":{},"readme":"gulp-tag-version\n================\n\n[![npm](https://img.shields.io/npm/v/gulp-tag-version.svg?maxAge=2592000&style=flat-square)]()\n[![npm](https://img.shields.io/npm/dt/gulp-tag-version.svg?maxAge=2592000&style=flat-square)]()\n[![npm](https://img.shields.io/npm/dm/gulp-tag-version.svg?maxAge=2592000&style=flat-square)]()\n\nTag git repository with current package version (gulp plugin).\n\nIt will read the `version` attribute (by default, override with `key` option) from the JSON stream (probably your `package.json` or `bower.json`), prefixes it with `\"v\"` (override with `prefix` option) and _tags_ the repository (effectively issues the `git tag <tagname>` command) with such created tagname (e.g. `v1.2.3`).\n\n\nSimple example gulpfile\n-----------------------\n```js\nvar gulp = require('gulp'),\n    tagVersion = require('gulp-tag-version');\n\n// Assuming there's \"version: 1.2.3\" in package.json,\n// tag the last commit as \"v1.2.3\"\ngulp.task('tag', function() {\n  return gulp.src(['./package.json']).pipe(tagVersion());\n});\n```\n\n\nAdvanced example gulpfile (with bumping and commiting)\n------------------------------------------------------\n\n```js\n\n// dependencies\nvar gulp = require('gulp'),\n    git = require('gulp-git'),\n    bump = require('gulp-bump'),\n    filter = require('gulp-filter'),\n    tagVersion = require('gulp-tag-version');\n\n/**\n * Bumping version number and tagging the repository with it.\n * Please read http://semver.org/\n *\n * You can use the commands\n *\n *     gulp patch     # makes v0.1.0 → v0.1.1\n *     gulp feature   # makes v0.1.1 → v0.2.0\n *     gulp release   # makes v0.2.1 → v1.0.0\n *\n * To bump the version numbers accordingly after you did a patch,\n * introduced a feature or made a backwards-incompatible release.\n */\n\nfunction inc(importance) {\n    // get all the files to bump version in\n    return gulp.src(['./package.json', './bower.json'])\n        // bump the version number in those files\n        .pipe(bump({type: importance}))\n        // save it back to filesystem\n        .pipe(gulp.dest('./'))\n        // commit the changed version number\n        .pipe(git.commit('bumps package version'))\n\n        // read only one file to get the version number\n        .pipe(filter('package.json'))\n        // **tag it in the repository**\n        .pipe(tagVersion());\n}\n\ngulp.task('patch', function() { return inc('patch'); })\ngulp.task('feature', function() { return inc('minor'); })\ngulp.task('release', function() { return inc('major'); })\n```\n\nOther features/remarks\n----------------------\n\n* If you need any special tagging options to be passed down to `git.tag`, just add it to the `tagVersion` options. For example:\n```js\ngulp.task('bump_submodule', function(){\n    return gulp.src('./bower.json',  { cwd: './dist' })\n        .pipe(bump({type: 'patch'}))\n        .pipe(gulp.dest('./',{ cwd: './dist' }))\n        .pipe(git.commit('bumps package version',{cwd: './dist'}))\n        .pipe(filter('bower.json'))\n        .pipe(tagVersion({cwd: './dist'}));\n});\n```\n\n* If you don't want the version number to be read from the input stream, use the `version` parameter:\n```js*\nreturn gulp.src ...\n  ...\n  .pipe(tagVersion({version: '1.2.3'}));\n```\n\nThanks :beer:\n--------\n\n* to guys and gals from Fractal for [Gulp](http://gulpjs.com/) itself, obviously\n* to Steve Lacy (http://slacy.me) for creating [`gulp-bump`](https://github.com/stevelacy/gulp-bump) and [`gulp-git`](https://github.com/stevelacy/gulp-git) used here\n* The main file structure is based on `gulp-bump` a bit as well (this is my first plugin :))\n* To [@pacemkr](https://github.com/pacemkr) for the first pull request I ever got (supporting empty prefix)\n* To [@lapanoid](https://github.com/lapanoid) for passing `opts` down to `git.tag`\n* To [@brianmhunt](https://github.com/brianmhunt) for suggesting the `version` parameter\n* To [@adambuczynski](https://github.com/adambuczynski) for option to customize tag label\n* To [@mjeanroy](https://github.com/mjeanroy) for a gulp-util obsoletion update\n","publish_time":1410333054504,"_cnpm_publish_time":1410333054504,"dist-tags":{"latest":"1.3.1"}}