sindresorhus / gulp-rev

Static asset revisioning by appending content hash to filenames: `unicorn.css` → `unicorn-d41d8cd98f.css`
MIT License
1.54k stars 217 forks source link

not work with gulp watch #259

Open TangMonk opened 5 years ago

TangMonk commented 5 years ago
function js_files() {
    return src('./assets/scripts/*.js')
        .pipe(dest('./public/scripts'))
        .pipe(rev())
        .pipe(dest('./public/scripts'))
        .pipe(rename({
            dirname: "/scripts/"
        }))
        .pipe(rev.manifest('public/rev-manifest.json',{
            merge: true,
            base: './public'
        }))
        .pipe(dest('./public/'))
}

function defaultTask(cb) {
    watch('./assets/scripts/*.js', {ignoreInitial: false}, js_files)
}

exports.default = defaultTask;

It manifest only changes when first run npx gulp, then it not changed whenever I change my source js file.

Please look at the following screen record(the gif the bit large, please patient):

imgur

benbieler commented 4 years ago

Still an issue?