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,6 +43,7 @@ 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);')) | ||
46 | .pipe($.ngAnnotate()) | 47 | .pipe($.ngAnnotate()) |
47 | .pipe($.uglify({ preserveComments: $.uglifySaveLicense })).on('error', conf.errorHandler('Uglify')) | 48 | .pipe($.uglify({ preserveComments: $.uglifySaveLicense })).on('error', conf.errorHandler('Uglify')) |
48 | .pipe(jsFilter.restore()) | 49 | .pipe(jsFilter.restore()) |
@@ -68,16 +69,26 @@ gulp.task('html', ['inject', 'partials'], function () { | @@ -68,16 +69,26 @@ gulp.task('html', ['inject', 'partials'], function () { | ||
68 | 69 | ||
69 | // Only applies for fonts from bower dependencies | 70 | // Only applies for fonts from bower dependencies |
70 | // Custom fonts are handled by the "other" task | 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 | return gulp.src([ | 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 | .pipe($.filter('**/*.{eot,svg,ttf,woff,woff2}')) | 78 | .pipe($.filter('**/*.{eot,svg,ttf,woff,woff2}')) |
77 | .pipe($.flatten()) | 79 | .pipe($.flatten()) |
78 | .pipe(gulp.dest(path.join(conf.paths.dist, '/fonts/'))); | 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 | gulp.task('other', function () { | 92 | gulp.task('other', function () { |
82 | var fileFilter = $.filter(function (file) { | 93 | var fileFilter = $.filter(function (file) { |
83 | return file.stat.isFile(); | 94 | return file.stat.isFile(); |