Skip to content
Snippets Groups Projects
Commit 3029d61c authored by Felix Häberle's avatar Felix Häberle :speech_balloon:
Browse files

Update gulpfile with bugfixes

parent 3b05eb8b
No related branches found
No related tags found
1 merge request!1add support for gulp v4
......@@ -35,8 +35,15 @@ gulp.task('fonts-{{ package.name }}', function() {
{% endif %}
{% endfor %}
{% if fontDefined %}
// Provide fonts from all libraries
gulp.task('fonts', {% if fontDefined %}gulp.series(gulp.parallel({% for name, package in bower_assets %}{% if package.fonts is defined %}'fonts-{{ package.name }}', {% endif %}{% endfor %})){% endif %});
gulp.task('fonts', gulp.parallel(
{% for name, package in bower_assets %}
{% if package.fonts is defined %}'fonts-{{ package.name }}'{% if not loop.last %}, {% endif %}
{% endif %}
{% endfor %}));
{% endif %}
{# This variable is needed to search for defined js in packages #}
{% set jsDefined = false %}
......@@ -52,8 +59,15 @@ gulp.task('js-{{ package.name }}', function() {
{% endif %}
{% endfor %}
{% if jsDefined %}
// Provide JS from all libraries
gulp.task('js', {% if jsDefined %}gulp.series(gulp.parallel({% for name, package in bower_assets %}{% if package.js is defined %}'js-{{ package.name }}', {% endif %}{% endfor %})){% endif %});
gulp.task('js', gulp.parallel(
{% for name, package in bower_assets %}
{% if package.js is defined %}'js-{{ package.name }}'{% if not loop.last %}, {% endif %}
{% endif %}
{% endfor %}));
{% endif %}
// Pre-process CSS
gulp.task('css', function() {
......@@ -84,4 +98,4 @@ gulp.task('watch', function() {
});
// Default task: run all other tasks in the correct order
gulp.task('default', gulp.series(gulp.parallel('fonts', 'js', 'css')));
gulp.task('default', gulp.parallel({% if fontDefined %}'fonts', {% endif %}{% if jsDefined %}'js', {% endif %}'css'));
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment