Permalink
Browse files

Error handling in gulp build file.

Added package-lock.json
Updated package version.
  • Loading branch information...
JixunMoe committed Jul 27, 2017
1 parent 6532206 commit 439051a9d564a0537d07badc6da3b8b0a4ec6f9f
Showing with 2,746 additions and 14 deletions.
  1. +15 −10 gulpfile.js
  2. +2,723 −0 package-lock.json
  3. +8 −4 package.json
@@ -1,4 +1,5 @@
var gulp = require('gulp');
var gutil = require('gulp-util');
var less = require('gulp-less');
var cleancss = require('gulp-clean-css');
var csscomb = require('gulp-csscomb');
@@ -85,19 +86,23 @@ gulp.task('minify', function() {
var mangleProperties = {
regex: /^m_/
};
var uglify_pipe = uglify({
mangle: {
properties: mangleProperties
},
// mangleProperties: mangleProperties
}).on('error', function (err) {
gutil.log(gutil.colors.red('[Error]'), err.toString());
this.emit('end');
});
gulp.src([
'./src/js/lib/*.js',
'./src/js/init.js',
'./src/js/app/*.js',
])
'./src/js/lib/*.js',
'./src/js/init.js',
'./src/js/app/*.js',
])
.pipe(concat('affinity.js'))
.pipe(through.obj(jsLicense.save()))
.pipe(uglify({
mangle: {
properties: mangleProperties
},
mangleProperties: mangleProperties
}))
.pipe(uglify_pipe)
.pipe(through.obj(jsLicense.restore()))
.pipe(rename({
suffix: '.min'
Oops, something went wrong.

0 comments on commit 439051a

Please sign in to comment.