Commit ed42176a authored by Tino Goratsch's avatar Tino Goratsch

rework the gulp watch task

parent f1c79e07
......@@ -13,12 +13,13 @@ module.exports = (gulp, plugins) => {
.src(
[
'./ACP3/Modules/*/*/Resources/Assets/js/{admin,frontend,partials}/*.js',
'./designs/**/Assets/js/**/*.js',
'./designs/*/*/Assets/js/{admin,frontend,partials}/*.js',
'./designs/*/Assets/js/*.js',
'./installation/design/Assets/js/*.js',
'./installation/Installer/Modules/*/Resources/Assets/js/*.js',
// Exclude all already minified files
'!./ACP3/Modules/*/*/Resources/Assets/js/{admin,frontend,partials}/*.min.js',
'!./designs/**/Assets/js/**/*.min.js',
'!./designs/*/Assets/js/*.min.js',
'!./installation/design/Assets/js/*.min.js',
'!./installation/Installer/Modules/*/Resources/Assets/js/*.min.js'
],
......
......@@ -6,14 +6,20 @@
module.exports = (gulp) => {
'use strict';
return () => {
return gulp.watch(
return (done) => {
gulp.watch(
[
'ACP3/Modules/*/*/Resources/Assets/less/**/*.less',
'designs/*/**/Assets/less/*.less',
'designs/*/**/Assets/less/**/*.less',
'installation/design/Assets/less/*.less',
'installation/Installer/Modules/*/Resources/Assets/less/style.less',
],
{cwd: './'},
gulp.task('less')
);
gulp.watch(
[
'ACP3/Modules/*/*/Resources/Assets/scss/**/*.scss',
'designs/*/**/Assets/scss/*.scss',
'designs/*/**/Assets/scss/**/*.scss',
......@@ -21,7 +27,25 @@ module.exports = (gulp) => {
'installation/Installer/Modules/*/Resources/Assets/scss/style.scss'
],
{cwd: './'},
gulp.series('less', 'scss')
gulp.task('scss')
);
gulp.watch(
[
'./ACP3/Modules/*/*/Resources/Assets/js/{admin,frontend,partials}/*.js',
'./designs/*/*/Assets/js/{admin,frontend,partials}/*.js',
'./designs/*/Assets/js/*.js',
'./installation/design/Assets/js/*.js',
'./installation/Installer/Modules/*/Resources/Assets/js/*.js',
// Exclude all already minified files
'!./ACP3/Modules/*/*/Resources/Assets/js/{admin,frontend,partials}/*.min.js',
'!./designs/*/Assets/js/*.min.js',
'!./installation/design/Assets/js/*.min.js',
'!./installation/Installer/Modules/*/Resources/Assets/js/*.min.js'
],
{cwd: './'},
gulp.task('babel')
);
done();
};
};
......@@ -3,7 +3,7 @@
* See the LICENSE file at the top-level module directory for licencing details.
*/
(function () {
(() => {
'use strict';
const gulp = require('gulp'),
......@@ -18,7 +18,7 @@
gulp.task('scss', getTask('scss'));
gulp.task('less', getTask('less'));
gulp.task('babel', getTask('babel'));
gulp.task('watch', gulp.series('less', 'scss', getTask('watch')));
gulp.task('watch', gulp.series(gulp.parallel('less', 'scss', 'babel'), getTask('watch')));
gulp.task('default', gulp.series('watch'));
})();
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment