Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/n30fly/gulp-css-cache-buster


https://github.com/n30fly/gulp-css-cache-buster

Last synced: about 2 months ago
JSON representation

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