Javascript 如何在html中更新脚本链接

Javascript 如何在html中更新脚本链接,javascript,gulp,Javascript,Gulp,我想更新dist文件目录的index.html中的脚本链接,但这段代码不能更新脚本链接吗?如何更新它 谢谢! 使用此链接下载我的项目-- 将html文件脚本链接更改为rev-manifest.json key.it worker var jsSrc = ['js/jquery-1.9.0.min.js','js/customer.js']; gulp.task('default', function() { gulp.start('clean','minifyjs','revCollec

我想更新dist文件目录的index.html中的脚本链接,但这段代码不能更新脚本链接吗?如何更新它

谢谢! 使用此链接下载我的项目--


将html文件脚本链接更改为rev-manifest.json key.it worker

var jsSrc = ['js/jquery-1.9.0.min.js','js/customer.js'];
gulp.task('default', function() {
    gulp.start('clean','minifyjs','revCollector');
});
gulp.task('clean', function(cb) {
    del(['minified/css', 'minified/js','rev/js','dist/'], cb)
});
gulp.task('minifyjs', function() {
    return gulp.src(jsSrc)
        .pipe(concat('main.js'))    
        .pipe(gulp.dest('dist/js'))   
        .pipe(rename({suffix: '.min'}))
        .pipe(uglify())    
        .pipe(rev())        
        .pipe(gulp.dest('dist/js')) 
        .pipe(rev.manifest())    
        .pipe(gulp.dest('dist/js')); 
});
gulp.task('revCollector', function() {
    return gulp.src(['dist/js/*.json','index.html']) 
        .pipe(revCollector({
            replaceReved: true
        })) 
        .pipe(gulp.dest('dist/')); 
});