Browse Source

Add fix for gulp 4

Signed-off-by: r4sas <r4sas@i2pmail.org>

Fix from https://github.com/zhukov/webogram/issues/1863#issuecomment-507324801
master
R4SAS 5 years ago
parent
commit
b237792585
Signed by: r4sas
GPG Key ID: 66F6C87B98EBCFE2
  1. 11
      gulpfile.js
  2. 13529
      package-lock.json
  3. 2
      package.json

11
gulpfile.js

@ -7,6 +7,7 @@ var st = require('st') @@ -7,6 +7,7 @@ var st = require('st')
var del = require('del')
var swPrecache = require('sw-precache')
var Server = require('karma').Server
var manifest = require('gulp-manifest3')
// The generated file is being created at src
// so it can be fetched by usemin.
@ -236,13 +237,13 @@ function writeServiceWorkerFile (rootDir, handleFetch, callback) { @@ -236,13 +237,13 @@ function writeServiceWorkerFile (rootDir, handleFetch, callback) {
swPrecache.write(path.join(rootDir, 'service_worker.js'), config, callback)
}
gulp.task('generate-service-worker', gulp.series('build', function (callback) {
/*gulp.task('generate-service-worker', gulp.series('build', function (callback) {
writeServiceWorkerFile('dist', true, callback)
}))
}))*/
gulp.task('add-appcache-manifest', gulp.series('build', function () {
return gulp.src(fileGlobs)
.pipe($.manifest({
.pipe(manifest({
timestamp: false,
hash: true,
network: ['http://*', 'https://*', '*'],
@ -348,7 +349,9 @@ gulp.task('tdd', gulp.series('templates', 'karma-tdd')) @@ -348,7 +349,9 @@ gulp.task('tdd', gulp.series('templates', 'karma-tdd'))
gulp.task('package', gulp.series('cleanup-dist'))
gulp.task('publish', gulp.series('add-appcache-manifest', 'generate-service-worker'))
gulp.task('publish', gulp.series('add-appcache-manifest', function (callback) {
writeServiceWorkerFile('dist', true, callback)
}))
gulp.task('deploy', function () {
return gulp.src('./dist/**/*')

13529
package-lock.json generated

File diff suppressed because it is too large Load Diff

2
package.json

@ -54,7 +54,7 @@ @@ -54,7 +54,7 @@
"gulp-less": "^4.0.1",
"gulp-livereload": "^4.0.1",
"gulp-load-plugins": "^1.5.0",
"gulp-manifest": "0.1.1",
"gulp-manifest3": "^0.1.2",
"gulp-minify-css": "^0.3.12",
"gulp-minify-html": "^0.1.1",
"gulp-ng-annotate": "~0.5.2",

Loading…
Cancel
Save