Browse Source

Improved gulp file

master
Igor Zhukov 9 years ago
parent
commit
5c29669c22
  1. 20
      gulpfile.js

20
gulpfile.js

@ -25,7 +25,7 @@ gulp.task('templates', function() {
.pipe(gulp.dest('app/js')); .pipe(gulp.dest('app/js'));
}); });
gulp.task('usemin', ['templates', 'enable-production'], function() { gulp.task('usemin', function() {
return gulp.src(['app/index.html', 'app/badbrowser.html']) return gulp.src(['app/index.html', 'app/badbrowser.html'])
.pipe($.usemin({ .pipe($.usemin({
html: [$.minifyHtml({empty: true})], html: [$.minifyHtml({empty: true})],
@ -171,8 +171,7 @@ gulp.task('generate-service-worker', ['build'], function() {
}); });
gulp.task('add-appcache-manifest', ['build'], function() { gulp.task('add-appcache-manifest', ['build'], function() {
return es.concat( return gulp.src(fileGlobs)
gulp.src(fileGlobs)
.pipe($.manifest({ .pipe($.manifest({
timestamp: true, timestamp: true,
network: ['http://*', 'https://*', '*'], network: ['http://*', 'https://*', '*'],
@ -180,18 +179,7 @@ gulp.task('add-appcache-manifest', ['build'], function() {
exclude: ['webogram.appcache', 'app.manifest'] exclude: ['webogram.appcache', 'app.manifest']
}) })
) )
.pipe(gulp.dest('./dist')), .pipe(gulp.dest('./dist'));
gulp.src(fileGlobs)
.pipe($.manifest({
timestamp: true,
network: ['http://*', 'https://*', '*'],
filename: 'app.manifest',
exclude: ['webogram.appcache', 'app.manifest']
})
)
.pipe(gulp.dest('./dist'))
);
}); });
gulp.task('package-dev', function() { gulp.task('package-dev', function() {
@ -261,7 +249,7 @@ gulp.task('bump', ['update-version-manifests', 'update-version-config'], functio
gulp.task('build', ['clean'], function(callback) { gulp.task('build', ['clean'], function(callback) {
runSequence( runSequence(
'less', ['less', 'templates', 'enable-production'],
'usemin', 'usemin',
['copy', 'copy-locales', 'copy-images', 'disable-production'], ['copy', 'copy-locales', 'copy-images', 'disable-production'],
callback callback

Loading…
Cancel
Save