Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/n30fly/gulp-css-cache-buster
https://github.com/n30fly/gulp-css-cache-buster
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/n30fly/gulp-css-cache-buster
- Owner: n30fly
- Created: 2019-06-28T07:03:41.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2019-07-30T12:01:29.000Z (over 5 years ago)
- Last Synced: 2024-11-12T19:43:49.167Z (about 2 months ago)
- Language: JavaScript
- Size: 2.93 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# gulp-css-cache-buster
> Plugin for Gulp to set version of images in styles
## Install
```
$ npm install --save-dev gulp-css-cache-buster
```## Usage
```js
const gulp = require('gulp');
const ccBuster = require('gulp-css-cache-buster');gulp.task('default', () =>
gulp.src('src/file.css')
.pipe(ccBuster())
.pipe(gulp.dest('dist'))
);
```## API
### ccBuster([options])
#### options
Type: `Object`
##### options.urlParam
Type: `string`
Default: `v`Name of param appending to image
##### options.strategy
Type: `string`
Default: `random-string`Variants: `random-string`, `datetime`, `custom-value`
##### options.datetimeFormat
Type: `string`
Default: `DD.MM.Y HH:mm:ss`See https://momentjs.com/docs/#/displaying/format/
##### options.customValue
Type: `string`
Default: haven't default value