When trying to use gulp-ugily
with my angular application, it is breaking, even though I am running it through gulp-ngmin
.
Here is the gulp file:
var gulp = require('gulp'),
concat = require('gulp-concat'),
ngmin = require('gulp-ngmin'),
uglify = require('gulp-uglify');
gulp.task('compress', function() {
gulp.src('client/js/source/*.js')
.pipe(concat('app.js'))
.pipe(ngmin())
.pipe(uglify())
.pipe(gulp.dest('client/js'));
});
It helps to disable the mangle option in uglify, for it's messing with all the injection stuff and naming.
.pipe(uglify({ mangle: false }))