Browse Source

Improved gulp task for cache manifest

master
Igor Zhukov 11 years ago
parent
commit
12536ca9dd
  1. 31
      gulpfile.js

31
gulpfile.js

@ -130,14 +130,37 @@ gulp.task('disable-production', function() {
}); });
gulp.task('add-appcache-manifest', function() { gulp.task('add-appcache-manifest', function() {
return gulp.src(['./dist/**/*', '!dist/manifest.*', '!dist/index.html', '!dist/fonts/*', '!dist/img/icons/icon*.png', '!dist/js/background.js'])
var sources = [
'./dist/**/*',
'!dist/manifest.*',
'!dist/index.html',
'!dist/fonts/*',
'!dist/img/icons/icon*.png',
'!dist/js/background.js'
];
return es.concat(
gulp.src(sources)
.pipe($.manifest({ .pipe($.manifest({
timestamp: true, timestamp: true,
network: ['http://*', 'https://*', '*'], network: ['http://*', 'https://*', '*'],
filename: 'webogram.appcache', filename: 'webogram.appcache',
exclude: 'webogram.appcache' exclude: ['webogram.appcache', 'app.manifest']
})) })
.pipe(gulp.dest('./dist')); )
.pipe(gulp.dest('./dist')),
gulp.src(sources)
.pipe($.manifest({
timestamp: true,
network: ['http://*', 'https://*', '*'],
filename: 'app.manifest',
exclude: ['webogram.appcache', 'app.manifest']
})
)
.pipe(gulp.dest('./dist'))
);
}); });

Loading…
Cancel
Save