gulp-cache-hyper-bust

4.0.0 • Public • Published

Gulp version of cache-hyper-bust

gulpfile.js

const cacheBreaker = require('gulp-cache-hyper-bust');

[...]

gulp.task('cache-breaker', function(callback) {
    const timestamp = new Date().getTime();

    pump(
        [
            gulp.src(['path/to/scan/*.php', '!**/path/not/to/scan/**']),
            cacheBreaker({
                images: false,
                showLog: true,
                staticTimestamp: timestamp,
                type: 'timestamp',
            }),
            gulp.dest(
                // to overrite source file
                function(file) {
                    return file.base;
                }
            ),
        ],
        callback
    );
});

gulp.task('build', [
    'some',
    'other',
    'tasks',
    'cache-breaker',
);

[...]

Package Sidebar

Install

npm i gulp-cache-hyper-bust

Weekly Downloads

1

Version

4.0.0

License

MIT

Unpacked Size

7.53 kB

Total Files

13

Last publish

Collaborators

  • merkury