# gulp-version-replace

> Gulp extension to add license to file(s) in the pipeline

Latest version **1.0.9** (published 2016-07-19) · MIT license · 0 weekly downloads

## Install

```sh
npm install gulp-version-replace
pnpm add gulp-version-replace
yarn add gulp-version-replace
bun add gulp-version-replace
```

## 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.0.9 |
| Published | 2016-07-19 |
| First published | 2016-07-15 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | test command: echo \"Error: no test specified\" && exit 1 |
| Maintainers | fengyk |
| Keywords | entry, point:, (index.js) |

## Links

- npm: https://www.npmjs.com/package/gulp-version-replace
- Repository: https://github.com/Davidxiaoyang/gulp-version-replace
- Homepage: https://github.com/Davidxiaoyang/gulp-version-replace#readme
- Issues: https://github.com/Davidxiaoyang/gulp-version-replace/issues
- npm.io page: https://npm.io/package/gulp-version-replace

## Dependencies (2)

- [gulp-util](https://npm.io/package/gulp-util.md) ^3.0.7
- [event-stream](https://npm.io/package/event-stream.md) ^3.3.3

## Alternatives

- [@sentry/react-native](https://npm.io/package/@sentry/react-native.md) — 2.6M weekly downloads
- [@ardatan/aggregate-error](https://npm.io/package/@ardatan/aggregate-error.md) — 708.1K weekly downloads
- [custom-error-generator](https://npm.io/package/custom-error-generator.md) — 2.0K weekly downloads
- [@technik-sde/prosemirror-recreate-transform](https://npm.io/package/@technik-sde/prosemirror-recreate-transform.md) — 1.5K weekly downloads
- [@suchipi/error-utils](https://npm.io/package/@suchipi/error-utils.md) — 78 weekly downloads

## Recent versions

- 1.0.9 (latest) — 2016-07-19
- 1.0.8 — 2016-07-19
- 1.0.7 — 2016-07-19
- 1.0.68 — 2016-07-18
- 1.0.67 — 2016-07-15
- 1.0.66 — 2016-07-15
- 1.0.65 — 2016-07-15
- 1.0.64 — 2016-07-15
- 1.0.63 — 2016-07-15
- 1.0.61 — 2016-07-15
- 1.0.5 — 2016-07-15
- 1.0.4 — 2016-07-15
- 1.0.3 — 2016-07-15
- 1.0.2 — 2016-07-15
- 1.0.111 — 2016-07-15
- … 3 more at https://npm.io/package/gulp-version-replace/versions

## README

gulp-version-replace
---
> gulp plugin for cache-busting files using query string file hash


installation
---
```
$ npm install gulp-version-replace --save-dev
```

how?
---
_gulpfile.js_
```
var gulp = require('gulp');
var repV = require('gulp-version-replace');

gulp.task('rev', function () {
    var re = /href=\"{!! asset\(\'(.*)\?rev=(.*)\'\) !!}/gi;
    gulp.src('test/**/*.html')
        .pipe(repV({regRxp : '',path : ''}))
        .pipe(gulp.dest('dist'));
});
<!doctype html>
<html>
  <head>
    <link rel="stylesheet" type="text/css" href="style/style-one.css?rev=@@hash">
    <script src="script/script-one.js?rev=@@hash"></script>
    <script src="script/script-two.js"></script>
  </head>
  <body>
    <div><p>hello, world!</p></div>
    <script src="script/script-three.js?rev=@@hash"></script>
  </body>
</html>
```

will turn into something similar as the following after running `gulp-version-replace`:
```
<!doctype html>
<html>
  <head>
    <link rel="stylesheet" type="text/css" href="style/style-one.css?rev=d65aaba987e9c1eefeb4be9cfd34e0de">
    <script src="script/script-one.js?rev=17a5da6c8a2d875cf48aefb722eefa07"></script>
    <script src="script/script-two.js"></script>
  </head>
  <body>
    <div><p>hello, world!</p></div>
    <script src="script/script-three.js?rev=5cadf43edba6a97980d42331f9fffd17"></script>
  </body>
</html>
```

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