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
f43c24ea
Commit
f43c24ea
authored
6 years ago
by
Felix Häberle
Browse files
Options
Downloads
Patches
Plain Diff
add support for gulp v4
parent
30fce178
No related branches found
No related tags found
1 merge request
!1
add support for gulp v4
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
templates/gulpfile.js.twig
+8
-4
8 additions, 4 deletions
templates/gulpfile.js.twig
templates/package.json
+1
-1
1 addition, 1 deletion
templates/package.json
with
9 additions
and
5 deletions
templates/gulpfile.js.twig
+
8
−
4
View file @
f43c24ea
...
...
@@ -21,8 +21,12 @@ var autoprefixer = require('autoprefixer'),
},
options = minimist(process.argv.slice(2), knownOptions);
{# This variable is needed to search for defined fonts in packages #}
{%
set
fontDefined
=
false
%}
{%
for
name
,
package
in
bower_assets
%}
{%
if
package.fonts
is
defined
%}
{%
set
fontDefined
=
true
%}
// Provide fonts from
{{
name
}}
gulp.task('fonts-
{{
package.name
}}
', function() {
return gulp.src('
{{
package.fonts.relative
}}
/**')
...
...
@@ -32,7 +36,7 @@ gulp.task('fonts-{{ package.name }}', function() {
{%
endif
%}
{%
endfor
%}
// Provide fonts from all libraries
gulp.task('fonts',
[
{%
for
name
,
package
in
bower_assets
%}{%
if
package.fonts
is
defined
%}
'fonts-
{{
package.name
}}
',
{%
endif
%}{%
endfor
%}
]
);
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
%}
);
{%
for
name
,
package
in
bower_assets
%}
{%
if
package.js
is
defined
%}
...
...
@@ -45,7 +49,7 @@ gulp.task('js-{{ package.name }}', function() {
{%
endif
%}
{%
endfor
%}
// Provide JS from all libraries
gulp.task('js',
[
{%
for
name
,
package
in
bower_assets
%}{%
if
package.js
is
defined
%}
'js-
{{
package.name
}}
',
{%
endif
%}{%
endfor
%}
]
);
gulp.task('js',
{%
if
fontDefined
%}
gulp.series(gulp.parallel(
{%
for
name
,
package
in
bower_assets
%}{%
if
package.js
is
defined
%}
'js-
{{
package.name
}}
',
{%
endif
%}{%
endfor
%}
))
{%
endif
%}
);
// Pre-process CSS
gulp.task('css', function() {
...
...
@@ -72,8 +76,8 @@ gulp.task('css', function() {
// Rerun the task when a file changes
gulp.task('watch', function() {
gulp.watch(config.sassPath + '/**/*.scss',
[
'css'
]
);
gulp.watch(config.sassPath + '/**/*.scss',
gulp.parallel(
'css'
)
);
});
// Default task: run all other tasks in the correct order
gulp.task('default',
[
'fonts', 'js', 'css'
]
);
gulp.task('default',
gulp.series(gulp.parallel(
'fonts', 'js', 'css'
))
);
This diff is collapsed.
Click to expand it.
templates/package.json
+
1
−
1
View file @
f43c24ea
...
...
@@ -5,7 +5,7 @@
},
"dependencies"
:
{
"autoprefixer"
:
"^7.1.1"
,
"gulp"
:
"^
3.9
.0"
,
"gulp"
:
"^
4.0
.0"
,
"gulp-if"
:
"^2.0.0"
,
"gulp-notify"
:
"^2.2.0"
,
"gulp-postcss"
:
"^7.0.0"
,
...
...
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