Commit ebacac00 authored by Tino Goratsch's avatar Tino Goratsch

rework the gulp watch task

parent 417ab6c6
......@@ -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,9 +6,8 @@
module.exports = (gulp) => {
'use strict';
return () => {
// Watch all the .less files, then run the less task
return gulp.watch(
return (done) => {
gulp.watch(
[
'ACP3/Modules/*/*/Resources/Assets/scss/**/*.scss',
'designs/*/**/Assets/scss/*.scss',
......@@ -17,7 +16,25 @@ module.exports = (gulp) => {
'installation/Installer/Modules/*/Resources/Assets/scss/style.scss'
],
{cwd: './'},
gulp.series('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'),
......@@ -17,7 +17,7 @@
gulp.task('bump-version', getTask('bump-version'));
gulp.task('scss', getTask('scss'));
gulp.task('babel', getTask('babel'));
gulp.task('watch', gulp.series('scss', getTask('watch')));
gulp.task('watch', gulp.series(gulp.parallel('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