Skip to content
Permalink
Browse files
Replace removed preserveComments option.
  • Loading branch information
RubenVerborgh committed Jul 28, 2017
1 parent 63b137a commit f4a726e389da063247d876c0d7e7988743627551
Showing with 10 additions and 2 deletions.
  1. +3 −2 gulpfile.js
  2. +6 −0 package-lock.json
  3. +1 −0 package.json
@@ -13,6 +13,7 @@ var gulp = require('gulp'),
sourcemaps = require('gulp-sourcemaps'),
sync = require('browser-sync').create(),
uglify = require('gulp-uglify'),
saveLicense = require('uglify-save-license'),
util = require('gulp-util');

var production = util.env.production;
@@ -76,7 +77,7 @@ gulp.task('scripts:ui', ['deps:n3'], function (done) {
], { base: './' }),
sourcemaps.init({ loadMaps: true }),
concat('ldf-client-ui-packaged.js'),
production ? uglify({ preserveComments: 'license' }) : util.noop(),
production ? uglify({ output: { comments: saveLicense } }) : util.noop(),
sourcemaps.write('./', { sourceRoot: '../' }),
gulp.dest('build/scripts'),
sync.stream(),
@@ -94,7 +95,7 @@ gulp.task('scripts:worker', ['deps:ldf-client'], function (done) {
concat('ldf-client-worker.js'),
// Correct lodash from window (browser) to self (Web Worker)
replace(/var root =.*;/, 'var root = self;'),
production ? uglify({ preserveComments: 'license' }) : util.noop(),
production ? uglify({ output: { comments: saveLicense } }) : util.noop(),
sourcemaps.write('./', { sourceRoot: '../' }),
gulp.dest('build/scripts'),
sync.stream(),

Some generated files are not rendered by default. Learn more.

@@ -25,6 +25,7 @@
"postcss-csso": "^2.0.0",
"pre-commit": "^1.2.2",
"pump": "^1.0.2",
"uglify-save-license": "^0.4.1",
"vinyl-buffer": "^1.0.0",
"vinyl-source-stream": "^1.1.0"
},

0 comments on commit f4a726e

Please sign in to comment.