Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
Drupal 8 SASS Theme
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Service Desk
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
Composer
plugin
Drupal 8 SASS Theme
Commits
3029d61c
Commit
3029d61c
authored
6 years ago
by
Felix Häberle
Browse files
Options
Downloads
Patches
Plain Diff
Update gulpfile with bugfixes
parent
3b05eb8b
No related branches found
No related tags found
1 merge request
!1
add support for gulp v4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
templates/gulpfile.js.twig
+17
-3
17 additions, 3 deletions
templates/gulpfile.js.twig
with
17 additions
and
3 deletions
templates/gulpfile.js.twig
+
17
−
3
View file @
3029d61c
...
...
@@ -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'));
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment