# gulp-inject-git-rev

> Gulp plugin to inject the git revision number

Latest version **1.2.0** (published 2017-11-20) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install gulp-inject-git-rev
pnpm add gulp-inject-git-rev
yarn add gulp-inject-git-rev
bun add gulp-inject-git-rev
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.2.0 |
| Published | 2017-11-20 |
| First published | 2017-08-05 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 7 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Ronny Roeller |
| Maintainers | collaborne-team, cminardi, margherita.lazzarini, ankon, ronnyroeller |

## Links

- npm: https://www.npmjs.com/package/gulp-inject-git-rev
- Repository: https://github.com/Collaborne/gulp-inject-git-rev
- Homepage: https://github.com/Collaborne/gulp-inject-git-rev#readme
- Issues: https://github.com/Collaborne/gulp-inject-git-rev/issues
- npm.io page: https://npm.io/package/gulp-inject-git-rev

## Dependencies (7)

- [gulp](https://npm.io/package/gulp.md) ^3.9.1
- [path](https://npm.io/package/path.md) ^0.12.7
- [git-rev](https://npm.io/package/git-rev.md) ^0.2.1
- [gulp-if](https://npm.io/package/gulp-if.md) ^2.0.2
- [lazypipe](https://npm.io/package/lazypipe.md) ^1.0.1
- [gulp-size](https://npm.io/package/gulp-size.md) ^2.1.0
- [gulp-replace](https://npm.io/package/gulp-replace.md) ^0.6.1

## Recent versions

- 1.2.0 (latest) — 2017-11-20
- 1.1.2 — 2017-08-05
- 1.1.1 — 2017-08-05
- 1.1.0 — 2017-08-05
- 1.0.1 — 2017-08-05
- 1.0.0 — 2017-08-05

## README

# gulp-inject-git-rev [![Build Status](https://travis-ci.org/Collaborne/gulp-inject-git-rev.svg?branch=master)](https://travis-ci.org/Collaborne/gulp-inject-git-rev) [![Greenkeeper badge](https://badges.greenkeeper.io/Collaborne/gulp-inject-git-rev.svg)](https://greenkeeper.io/)
Gulp plugin to inject the git revision number

## Usage

Install the plugin:

```
npm install gulp-inject-git-rev --save
```

Add the `%%GULP.GIT_REV_VERSION%%` placeholder to any of your files, e.g.:

```
<html>
  <head>
    <script>
      window.REV_VERSION = '%%GULP.GIT_REV_VERSION%%';
      console.log(`This is revision ${window.REV_VERSION}.`);
    </script>
  </head>
  <body>
    Hello world from revision %%GULP.GIT_REV_VERSION%%!
  </body>
</html>
```

Finally, add the plugin to your gulpfile.js:

```
const injectGitRev = require('gulp-inject-git-rev');

gulp.task('default', ['fetch-git-rev'], function() {
  return gulp.src('src/**/*')
    .pipe(injectGitRev())
    .pipe(gulp.dest('dist'));
}
```

---
_Source: https://npm.io/package/gulp-inject-git-rev · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
