Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
GoGoCarto
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Pixel Humain
GoGoCarto
Commits
a6fba527
Commit
a6fba527
authored
3 years ago
by
Sebastian Castro
Browse files
Options
Downloads
Patches
Plain Diff
gulpfile: fix building translations
parent
2c6c822a
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
gulpfile.js
+7
-5
7 additions, 5 deletions
gulpfile.js
with
7 additions
and
5 deletions
gulpfile.js
+
7
−
5
View file @
a6fba527
...
...
@@ -25,11 +25,13 @@ const scriptsElementForm = () =>
.
pipe
(
concat
(
'
element-form.js
'
))
.
pipe
(
gulp
.
dest
(
'
web/js
'
));
const
scriptsLib
s
=
()
=>
{
const
translations
=
gulp
.
src
(
'
translations/javascripts-translations.yaml
'
)
const
buildTranslation
s
=
()
=>
gulp
.
src
(
'
translations/javascripts-translations.yaml
'
)
.
pipe
(
yaml
({
schema
:
'
DEFAULT_SAFE_SCHEMA
'
,
ext
:
'
.js
'
}))
.
pipe
(
header
(
"
var gogoI18n =
"
))
.
pipe
(
gulp
.
dest
(
'
web/js
'
))
const
scriptsLibs
=
()
=>
{
const
gogocarto
=
gulp
.
src
([
'
node_modules/gogocarto-js/dist/gogocarto.js
'
,
'
assets/js/init-sw.js
'
,
...
...
@@ -40,7 +42,7 @@ const scriptsLibs = () => {
.
pipe
(
gulp
.
dest
(
'
web/js
'
));
const
sw
=
gulp
.
src
([
'
assets/js/vendor/**/*
'
])
.
pipe
(
gulp
.
dest
(
'
web/js
'
));
return
merge
(
translations
,
gogocarto
,
sw
);
return
merge
(
gogocarto
,
sw
);
};
const
serviceWorker
=
async
()
=>
{
...
...
@@ -115,7 +117,7 @@ exports.watch = () => {
gulp
.
series
(
gogocarto_assets
,
serviceWorker
));
gulp
.
watch
([
'
assets/js/vendor/**/*.js
'
,
'
assets/js/admin/**/*.js
'
,
'
node_modules/gogocarto-js/dist/gogocarto.js
'
,
'
custom/**/*.js
'
,
'
assets/js/i18n.js
'
,
'
translations/javascripts-translations.yaml
'
],
gulp
.
series
(
scriptsLibs
,
serviceWorker
));
gulp
.
series
(
buildTranslations
,
scriptsLibs
,
serviceWorker
));
gulp
.
watch
([
'
assets/js/home.js
'
],
gulp
.
series
(
scriptsHome
,
serviceWorker
));
};
...
...
@@ -126,7 +128,7 @@ const cleanCss = () =>
const
cleanJs
=
()
=>
del
([
'
web/js
'
]);
exports
.
build
=
gulp
.
series
(
cleanJs
,
cleanCss
,
gulp
.
parallel
(
stylesBuild
,
scriptsLibs
,
scriptsHome
,
scriptsExternalPages
,
scriptsElementForm
,
gogocarto_assets
),
serviceWorker
);
exports
.
build
=
gulp
.
series
(
cleanJs
,
cleanCss
,
buildTranslations
,
gulp
.
parallel
(
stylesBuild
,
scriptsLibs
,
scriptsHome
,
scriptsExternalPages
,
scriptsElementForm
,
gogocarto_assets
),
serviceWorker
);
exports
.
production
=
gulp
.
parallel
(
gulp
.
series
(
prod_styles
,
gzip_styles
),
gulp
.
series
(
prod_js
,
gzip_js
));
...
...
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