Skip to content

Commit 07ee3a5

Browse files
committed
Merge pull request #1811 from angular-fullstack/fix/gulp-css
Fix/gulp css
2 parents f1bfcfb + dc72c33 commit 07ee3a5

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

Diff for: app/templates/_package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@
6565
"jshint": "2.9.2",
6666
"gulp-livereload": "^3.8.0",
6767
"gulp-load-plugins": "^1.0.0-rc.1",
68-
"gulp-minify-css": "^1.1.6",
68+
"gulp-clean-css": "^2.0.6",
6969
"gulp-mocha": "^2.1.3",
7070
"gulp-ng-annotate": "^2.0.0",
7171
"gulp-ng-constant": "^1.1.0",

Diff for: app/templates/gulpfile.babel(gulp).js

+6-2
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,8 @@ let styles = lazypipe()
136136
})<% } if(filters.sass) { %>
137137
.pipe(plugins.sass)<% } if(filters.less) { %>
138138
.pipe(plugins.less)<% } %>
139+
<%_ if(filters.css) { _%>
140+
.pipe(plugins.cleanCss, {processImportFrom: ['!fonts.googleapis.com']})<% } %>
139141
.pipe(plugins.autoprefixer, {browsers: ['last 1 version']})
140142
.pipe(plugins.sourcemaps.write, '.');<% if(filters.babel) { %>
141143

@@ -295,7 +297,10 @@ gulp.task('tsd:test', cb => {
295297
});<% } %>
296298

297299
gulp.task('styles', () => {
300+
<%_ if(!filters.css) { _%>
298301
return gulp.src(paths.client.mainStyle)
302+
<%_ } else { _%>
303+
return gulp.src(paths.client.styles)<% } %>
299304
.pipe(styles())
300305
.pipe(gulp.dest('.tmp/app'));
301306
});<% if(filters.ts) { %>
@@ -581,8 +586,7 @@ gulp.task('build:client', ['transpile:client', 'styles', 'html', 'constant'], ()
581586
.pipe(plugins.uglify())
582587
.pipe(jsFilter.restore)
583588
.pipe(cssFilter)
584-
.pipe(plugins.minifyCss({
585-
cache: true,
589+
.pipe(plugins.cleanCss({
586590
processImportFrom: ['!fonts.googleapis.com']
587591
}))
588592
.pipe(cssFilter.restore)

0 commit comments

Comments
 (0)