Commit 546ff8bffe97e7ac75e7032efe6dda9fba506171
1 parent
1e9de07f
Exists in
master
and in
8 other branches
Add production flag to build task
Showing
1 changed file
with
3 additions
and
3 deletions
Show diff stats
gulp/build.js
@@ -43,9 +43,9 @@ gulp.task('html', ['inject', 'partials'], function () { | @@ -43,9 +43,9 @@ gulp.task('html', ['inject', 'partials'], function () { | ||
43 | .pipe(assets = $.useref.assets()) | 43 | .pipe(assets = $.useref.assets()) |
44 | .pipe($.rev()) | 44 | .pipe($.rev()) |
45 | .pipe(jsFilter) | 45 | .pipe(jsFilter) |
46 | - .pipe($.replace('$logProvider.debugEnabled(true);', '$logProvider.debugEnabled(false);')) | ||
47 | - .pipe($.replace('http://hom.dialoga.gov.br', 'http://login.dialoga.gov.br')) | ||
48 | - .pipe($.replace('http://hom.login.dialoga.gov.br', 'http://login.dialoga.gov.br')) | 46 | + .pipe($.if($.util.env.server === 'production', $.replace('$logProvider.debugEnabled(true);', '$logProvider.debugEnabled(false);'))) |
47 | + .pipe($.if($.util.env.server === 'production', $.replace('http://hom.dialoga.gov.br', 'http://login.dialoga.gov.br'))) | ||
48 | + .pipe($.if($.util.env.server === 'production', $.replace('http://hom.login.dialoga.gov.br', 'http://login.dialoga.gov.br'))) | ||
49 | .pipe($.ngAnnotate()) | 49 | .pipe($.ngAnnotate()) |
50 | .pipe($.uglify({ preserveComments: $.uglifySaveLicense })).on('error', conf.errorHandler('Uglify')) | 50 | .pipe($.uglify({ preserveComments: $.uglifySaveLicense })).on('error', conf.errorHandler('Uglify')) |
51 | .pipe(jsFilter.restore()) | 51 | .pipe(jsFilter.restore()) |