Commit 546ff8bffe97e7ac75e7032efe6dda9fba506171

Authored by Leonardo Merlin
1 parent 1e9de07f

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 43 .pipe(assets = $.useref.assets())
44 44 .pipe($.rev())
45 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 49 .pipe($.ngAnnotate())
50 50 .pipe($.uglify({ preserveComments: $.uglifySaveLicense })).on('error', conf.errorHandler('Uglify'))
51 51 .pipe(jsFilter.restore())
... ...