mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-10 11:33:17 +00:00
add debug mode for gulp watch
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
var gulp = require('gulp');
|
||||
var config = require('../config.js');
|
||||
var utils = require('../utils.js');
|
||||
var debugMode = false;
|
||||
|
||||
gulp.task('copy-authentication-images', function(){
|
||||
return gulp.src([config.paths.src + 'authentication/images/**/*'])
|
||||
@@ -9,7 +10,7 @@ gulp.task('copy-authentication-images', function(){
|
||||
gulp.task('build-authentication-css', function(){
|
||||
return utils.buildCssGroup([
|
||||
config.paths.src + 'authentication/styles/main.scss'
|
||||
], 'authentication', 'authentication/css/');
|
||||
], 'authentication', 'authentication/css/', debugMode);
|
||||
});
|
||||
|
||||
gulp.task('build-authentication-js', function(){
|
||||
@@ -17,17 +18,20 @@ gulp.task('build-authentication-js', function(){
|
||||
config.paths.vendors + 'requirejs/require.js',
|
||||
config.paths.dist + 'scripts/apps/login/home/config.js'
|
||||
];
|
||||
return utils.buildJsGroup(authenticationGroup, 'authentication', 'authentication/js');
|
||||
return utils.buildJsGroup(authenticationGroup, 'authentication', 'authentication/js', debugMode);
|
||||
});
|
||||
|
||||
gulp.task('watch-authentication-js', function() {
|
||||
debugMode = true;
|
||||
return gulp.watch(config.paths.src + 'authentication/**/*.js', ['build-authentication-js']);
|
||||
});
|
||||
|
||||
gulp.task('watch-authentication-css', function() {
|
||||
debugMode = true;
|
||||
gulp.watch(config.paths.src + 'authentication/**/*.scss', ['build-authentication-css']);
|
||||
});
|
||||
|
||||
gulp.task('build-authentication', ['copy-authentication-images', 'build-authentication-css'], function(){
|
||||
debugMode = false;
|
||||
return gulp.start('build-authentication-js');
|
||||
});
|
Reference in New Issue
Block a user