lauriii / umami

[Deprecated] Umami is now included in Drupal Core. All further work happens there.
https://www.drupal.org/project/issues/drupal?component=Umami+demo
GNU General Public License v2.0
18 stars 5 forks source link

Add a Gulp watch task #74

Closed thamas closed 6 years ago

thamas commented 6 years ago

It should watch changing source files and auto rebuild. It would be nice to have Browsersync added too.

thamas commented 6 years ago

@markconroy's watch setting. Just to have it. :)

gulp.task('watch', 'Watches for your changes and refreshes all the things', function() {
  var config = require('./gulpfile-config.json');
  // Set your localhost address
  browserSync.init({
    proxy: config.browserSync.proxy
  });
  // Watch .scss files
  gulp.watch(['images/sprites/*.png'], ['sprite']);
  gulp.watch(["sass/**/*.scss", "sprites.scss", 'images/**/*'], ['styles:dev']);
  gulp.watch(['css/**/*.css', 'js/**/*.js', 'templates/**/*.html.twig']).on('change', browserSync.reload);
});
thamas commented 6 years ago

Current state