0
votes

I decided to use semantic ui for my new project. I set up everything and it works. Now, I have also used gulp for minifying my css and js, so my gulp file has all related code to do so. But, every time I change anything in my css I have to run gulp command so as the changes get reflected in minified files that i have included in my html. Can it be some how configure so that every time a css file changes, the minification task runs again?

1

1 Answers

0
votes

Yes, use the watch method to inspect a certain directory for changes. In this case, all the sass files are monitored for changes. When I save a file, the compile-sass task will run:

gulp.watch('./sass/**/*.scss', ['compile-sass']);

I placed the above line in my default task, but you can put to any task if you want more options in your development environment.