Skip to content

Commit

Permalink
Gulp now compressing theme CSS
Browse files Browse the repository at this point in the history
  • Loading branch information
mrvautin committed Feb 13, 2018
1 parent 26b9ff8 commit e3f0887
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 5 deletions.
19 changes: 14 additions & 5 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,9 @@ gulp.task('compressJS', () => {
.pipe(gulp.dest('public/javascripts'));
});

gulp.task('compressCSS', () => {
gulp.task('compressCss', () => {
return gulp.src(['public/stylesheets/*.css',
'!public/stylesheets/*.min.css',
'public/themes/*.css',
'!public/themes/*.min.css'
'!public/stylesheets/*.min.css'
])
.pipe(cleanCSS({compatibility: 'ie8'}))
.pipe(rename({
Expand All @@ -29,7 +27,18 @@ gulp.task('compressCSS', () => {
.pipe(gulp.dest('./'));
});

gulp.task('compressThemeCss', () => {
return gulp.src(['views/themes/**/*.css',
'!views/themes/**/*.min.css'
])
.pipe(cleanCSS({compatibility: 'ie8'}))
.pipe(rename({
extname: '.min.css'
}))
.pipe(gulp.dest('views/themes/'));
});

// run the tasks
gulp.task('deploy', (callback) => {
runsequence('compressJS', 'compressCSS', callback);
runsequence('compressJS', 'compressCss', 'compressThemeCss', callback);
});
1 change: 1 addition & 0 deletions views/themes/Cloth/style.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions views/themes/Material/style.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit e3f0887

Please sign in to comment.