Skip to content
This repository has been archived by the owner on Mar 31, 2023. It is now read-only.

Add gulp task to watch #336

Open
adamfchs opened this issue May 7, 2019 · 0 comments
Open

Add gulp task to watch #336

adamfchs opened this issue May 7, 2019 · 0 comments

Comments

@adamfchs
Copy link

adamfchs commented May 7, 2019

This is more a question and not an issue—wasn't sure where to post.

I've created a gulp task that will gzip the style.css which immediately gains 4-5 points in Google Page speed:

gulp.task('compress', function() {
gulp.src('./dist/*.css')
.pipe(gzip())
.pipe(gulp.dest('./dist'));
});

gulp.task('zip', ['css', 'compress']);

Its working fine, but I would like to plug it into the watch/compile process run with 'npm start' so that when the style.css gets automatically compiled, it gets automatically zipped as well.

Any direction on how I can go about doing this? This is my current npm start: "start": "gulp compile && gulp theme && gulp zip", zip is not working on style change

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant