https://github.com/redraw/gulp-rev-qs
Assets cache-busting plugin for gulp
https://github.com/redraw/gulp-rev-qs
Last synced: 3 months ago
JSON representation
Assets cache-busting plugin for gulp
- Host: GitHub
- URL: https://github.com/redraw/gulp-rev-qs
- Owner: redraw
- Created: 2015-11-26T13:03:04.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2015-11-26T13:19:32.000Z (over 10 years ago)
- Last Synced: 2025-01-25T17:33:18.839Z (over 1 year ago)
- Language: JavaScript
- Size: 0 Bytes
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
#gulp-rev-qs [![Build][travis-image]][travis-url]
The [gulp](http://gulpjs.com/) plugin for cache-busting files using query string.
e.g. ``````
##Install
```
npm install quex46/gulp-rev-qs --save
```
##Usage
```
-app/
|-gulpfile.js
|-assets/
|-views/
```
```javascript
// gulpfile.js
var gulp = require('gulp');
var rev = require('gulp-rev-qs');
gulp.task('rev', function () {
return gulp.src('views/**/*.html') // get all *.html files from ./views/
.pipe(rev('./assets')) // populate all "?rev=0" queries with checksums
.pipe(gulp.dest('rev_views')); // save populated html-files in ./rev_views/
});
```
```
$ gulp rev
```
## Options (*String*|*Object*)
**options.base** *String* - assets basepath
**options.resolver** *Function* - use this param if you would dinamically resolve asset filepath. See example [here](https://github.com/quex46/gulp-rev-qs/issues/1)
``rev('./assets')`` is identical to ``rev({base: './assets'})``
##Running tests
```
npm test
```
##License
gulp-rev-qs is licensed under the MIT License.
[travis-url]: https://travis-ci.org/quex46/gulp-rev-qs
[travis-image]: https://travis-ci.org/quex46/gulp-rev-qs.svg?branch=master