Skip to content

Commit 0ab24d3

Browse files
committed
fix(build): fixed AngularJS modules minification (removed saving temporary file to disk)
1 parent 6d4ed45 commit 0ab24d3

1 file changed

Lines changed: 3 additions & 8 deletions

File tree

gulpfile.js

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -115,12 +115,6 @@ var fnCacheTpls = function (path) {
115115
gulp.task('scripts:cacheTpls', function () {
116116
return fnCacheTpls(config.paths.templates);
117117
});
118-
gulp.task('scripts:ngmin', ['scripts:cacheTpls'], function () {
119-
return gulp.src(config.paths.scripts)
120-
.pipe(plugins.ngmin())
121-
.pipe(plugins.concat(pkg.name + '-' + pkg.version + '.js'))
122-
.pipe(gulp.dest(config.build + '/assets'));
123-
});
124118

125119
// Check JavaScript code quality with JSHint
126120
var fnLint = function (path, exitOnError) {
@@ -141,9 +135,10 @@ gulp.task('scripts:lint', function () {
141135
});
142136

143137
// Concat and minify JavaScript
144-
gulp.task('scripts', ['scripts:lint', 'scripts:ngmin', 'vendor:js'], function () {
145-
var arr = (config.vendor_files.js).concat([config.build + '/assets/' + pkg.name + '-' + pkg.version + '.js', config.build + '/app/templates.js']);
138+
gulp.task('scripts', ['scripts:lint', 'scripts:cacheTpls', 'vendor:js'], function () {
139+
var arr = (config.vendor_files.js).concat(config.paths.scripts.concat(config.build + '/app/templates.js'));
146140
return gulp.src(arr)
141+
.pipe(plugins.ngmin())
147142
.pipe(plugins.concat(pkg.name + '-' + pkg.version + '.js'))
148143
.pipe(plugins.size({ showFiles: true, title: '[JS]' }))
149144
.pipe(plugins.uglify({

0 commit comments

Comments
 (0)