From d5943d0edd8d954b602a9d6ef97839ba372b83f8 Mon Sep 17 00:00:00 2001 From: Raphael Benitte Date: Thu, 14 Apr 2016 13:37:30 +0900 Subject: [PATCH] chore(build): remove watch:*:dev tasks --- gulp/tasks/js.js | 4 ++-- gulp/tasks/watch.js | 29 ++++++++--------------------- 2 files changed, 10 insertions(+), 23 deletions(-) diff --git a/gulp/tasks/js.js b/gulp/tasks/js.js index b46bb8fd..0bccf7d1 100644 --- a/gulp/tasks/js.js +++ b/gulp/tasks/js.js @@ -75,10 +75,10 @@ function getWatcher(isDev) { ; } -gulp.task('watch:js:dev', function () { +gulp.task('watch:js', function () { return bundle(getWatcher(true), true) .on('end', function () { - gutil.log(chalk.yellow('watch:js:dev watcher ready')); + gutil.log(chalk.yellow('watch:js watcher ready')); }) ; }); diff --git a/gulp/tasks/watch.js b/gulp/tasks/watch.js index 8714ad12..c1f94447 100644 --- a/gulp/tasks/watch.js +++ b/gulp/tasks/watch.js @@ -2,29 +2,16 @@ var gulp = require('gulp'); var path = require('path'); var config = require('../config'); -function stylesWatcher(devMode) { - var appConfig = require(path.join(config.root, 'config.js')); - var theme = appConfig.theme; - var task = devMode ? 'styles:dev' : 'styles'; - - return gulp.watch([ - config.root + path.join('config.js'), // config for `theme` property - config.mozaikSrc + path.join('styl', '**', '*'), // mozaïk base styles - config.mozaikSrc + path.join('themes', '**', '*'), // mozaïk themes - config.root + path.join('themes', '**', '*'), // custom themes - config.root + path.join('node_modules', 'mozaik-ext-*', 'styl', '**', '*') // extensions styles - ], [task]); -} - -gulp.task('watch:styles:dev', function () { - return stylesWatcher(true); -}); - gulp.task('watch:styles', function () { - return stylesWatcher(false); + return gulp.watch([ + config.root + path.join('config.js'), // config for `theme` property + config.mozaikSrc + path.join('styl', '**', '*'), // mozaïk base styles + config.mozaikSrc + path.join('themes', '**', '*'), // mozaïk themes + config.root + path.join('themes', '**', '*'), // custom themes + config.root + path.join('node_modules', 'mozaik-ext-*', 'styl', '**', '*') // extensions styles + ], ['styles:dev']); }); -gulp.task('watch:dev', ['watch:styles:dev', 'watch:js:dev']); -gulp.task('watch', ['watch:styles', 'watch:js']); \ No newline at end of file +gulp.task('watch', ['watch:styles', 'watch:js']);