Commit 994ee1887c50b21fd4740636711f2e628eea6d80
1 parent
e49eeeba
Exists in
master
and in
8 other branches
Fix build task / font task
Showing
1 changed file
with
14 additions
and
3 deletions
Show diff stats
gulp/build.js
| ... | ... | @@ -43,6 +43,7 @@ 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);')) | |
| 46 | 47 | .pipe($.ngAnnotate()) |
| 47 | 48 | .pipe($.uglify({ preserveComments: $.uglifySaveLicense })).on('error', conf.errorHandler('Uglify')) |
| 48 | 49 | .pipe(jsFilter.restore()) |
| ... | ... | @@ -68,16 +69,26 @@ gulp.task('html', ['inject', 'partials'], function () { |
| 68 | 69 | |
| 69 | 70 | // Only applies for fonts from bower dependencies |
| 70 | 71 | // Custom fonts are handled by the "other" task |
| 71 | -gulp.task('fonts', function () { | |
| 72 | +gulp.task('fonts', ['fonts-bootstrap', 'fonts-opensans']); | |
| 73 | + | |
| 74 | +gulp.task('fonts-bootstrap', function () { | |
| 72 | 75 | return gulp.src([ |
| 73 | - $.mainBowerFiles().concat('bower_components/bootstrap-sass-official/assets/fonts/bootstrap/*'), | |
| 74 | - $.mainBowerFiles().concat('bower_components/open-sans-fontface/fonts/*') | |
| 76 | + 'bower_components/bootstrap-sass-official/assets/fonts/bootstrap/**/*' | |
| 75 | 77 | ]) |
| 76 | 78 | .pipe($.filter('**/*.{eot,svg,ttf,woff,woff2}')) |
| 77 | 79 | .pipe($.flatten()) |
| 78 | 80 | .pipe(gulp.dest(path.join(conf.paths.dist, '/fonts/'))); |
| 79 | 81 | }); |
| 80 | 82 | |
| 83 | +gulp.task('fonts-opensans', function () { | |
| 84 | + return gulp.src([ | |
| 85 | + 'bower_components/open-sans-fontface/fonts/**/*' | |
| 86 | + ]) | |
| 87 | + .pipe($.filter('**/*.{eot,svg,ttf,woff,woff2}')) | |
| 88 | + // .pipe($.flatten()) | |
| 89 | + .pipe(gulp.dest(path.join(conf.paths.dist, '/styles/fonts/'))); | |
| 90 | +}); | |
| 91 | + | |
| 81 | 92 | gulp.task('other', function () { |
| 82 | 93 | var fileFilter = $.filter(function (file) { |
| 83 | 94 | return file.stat.isFile(); | ... | ... |