Skip to content

Commit

Permalink
Speed up styles tasks
Browse files Browse the repository at this point in the history
  • Loading branch information
ronilaukkarinen committed Jun 23, 2021
1 parent bfc76c3 commit 0fa51c1
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
### 2.2.4: 2021-06-23

* Speed up styles tasks by adding a separate watch for prodstyles

### 2.2.3: 2021-06-23

* Confirmed fix for rule-empty-line-before from Air-light 7.7.3
Expand Down
1 change: 1 addition & 0 deletions gulp/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ module.exports = {
gutenberg: themeDir + 'sass/base/gutenberg.scss',
src: themeDir + 'sass/*.scss',
watch: themeDir + 'sass/**/*.{sass,scss}',
watchprod: themeDir + 'css/dev/*.css',
development: themeDir + 'css/dev/',
production: themeDir + 'css/prod/',
stylelint: {
Expand Down
3 changes: 2 additions & 1 deletion gulp/tasks/watch.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ const {
// Task
function watchfiles() {
bs.init(config.browsersync.src, config.browsersync.opts);
watch(config.styles.watch, series('devstyles', 'prodstyles', 'lintstyles')).on('error', handleError());
watch(config.styles.watch, series('devstyles', 'lintstyles')).on('error', handleError());
watch(config.styles.watchprod, series('prodstyles')).on('error', handleError());
watch(config.php.watch, series('phpcs')).on('change', bs.reload);
watch(config.js.watch).on('change', series('js'), bs.reload);
};
Expand Down

0 comments on commit 0fa51c1

Please sign in to comment.