Josiah / gulp-cachebust

Generates checksums and renames references to files, useful for cachebusting
30 stars 11 forks source link

References not being replaced #20

Closed rnarian closed 7 years ago

rnarian commented 8 years ago

I got the following two tasks:

gulp.task('bust:assets', function(){
  gulp.src([dirs.build + '/js/build.js'])
    .pipe(cachebust.resources())
    .pipe(gulp.dest(dirs.build + '/js'));
  gulp.src([dirs.build + '/css/*.css'])
    .pipe(cachebust.resources())
    .pipe(gulp.dest(dirs.build + '/css'));
  gulp.src([dirs.build + '/icons/**/*.css'])
    .pipe(cachebust.resources())
    .pipe(gulp.dest(dirs.build + '/icons'));
  gulp.src([dirs.build + '/images/**/*'])
    .pipe(cachebust.resources())
    .pipe(gulp.dest(dirs.build + '/images'));
});

gulp.task('bust:html', ['bust:assets'], function(){
  gulp.src([dirs.build + '**/*.html'])
    .pipe(cachebust.references())
    .pipe(gulp.dest(dirs.build));
});

Files from the bust:assets task are getting generated, but the references in the html files are not replaced and I can't figure out why.

alajfit commented 8 years ago

Can you confirm if the two Tasks are in using the same instance of cachebust ?