Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Cesium
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Monitor
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
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
clients
Cesium-grp
Cesium
Commits
3791729f
Commit
3791729f
authored
5 years ago
by
Benoit Lavenier
Browse files
Options
Downloads
Patches
Plain Diff
[enh] Fix release
parent
5b87c4c2
No related branches found
No related tags found
No related merge requests found
Pipeline
#8456
failed
5 years ago
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
gulpfile.js
+3
-2
3 additions, 2 deletions
gulpfile.js
hooks/after_prepare/020_remove_code.js
+1
-1
1 addition, 1 deletion
hooks/after_prepare/020_remove_code.js
hooks/after_prepare/040_useref.js
+4
-7
4 additions, 7 deletions
hooks/after_prepare/040_useref.js
with
8 additions
and
10 deletions
gulpfile.js
+
3
−
2
View file @
3791729f
...
...
@@ -277,6 +277,7 @@ function webClean() {
function
webCopyFiles
()
{
log
(
colors
.
green
(
'
Preparing dist/web files...
'
));
let
htmlminOptions
=
{
removeComments
:
true
,
collapseWhitespace
:
true
};
var
tmpPath
=
'
./dist/web/www
'
;
return
es
.
merge
(
...
...
@@ -291,7 +292,7 @@ function webCopyFiles() {
.
pipe
(
removeCode
({
"
no-device
"
:
true
}))
.
pipe
(
removeHtml
(
'
.hidden-no-device
'
))
.
pipe
(
removeHtml
(
'
[remove-if][remove-if="no-device"]
'
))
.
pipe
(
htmlmin
())
.
pipe
(
htmlmin
(
htmlminOptions
))
.
pipe
(
gulp
.
dest
(
tmpPath
+
'
/templates
'
)),
// Copy index.html (and remove unused code)
...
...
@@ -299,7 +300,7 @@ function webCopyFiles() {
.
pipe
(
removeCode
({
'
no-device
'
:
true
}))
.
pipe
(
removeHtml
(
'
.hidden-no-device
'
))
.
pipe
(
removeHtml
(
'
[remove-if][remove-if="no-device"]
'
))
.
pipe
(
htmlmin
())
.
pipe
(
htmlmin
(
/*no options, to keep comments*/
))
.
pipe
(
gulp
.
dest
(
tmpPath
)),
// Copy API index.html
...
...
This diff is collapsed.
Click to expand it.
hooks/after_prepare/020_remove_code.js
+
1
−
1
View file @
3791729f
...
...
@@ -67,7 +67,7 @@ if (rootdir) {
.
pipe
(
removeHtml
(
'
.hidden-xs.hidden-sm
'
))
.
pipe
(
removeHtml
(
'
.hidden-device
'
))
.
pipe
(
removeHtml
(
'
[remove-if][remove-if="device"]
'
))
.
pipe
(
htmlmin
(
/*no options, to
build
comments*/
))
.
pipe
(
htmlmin
(
/*no options, to
keep
comments*/
))
.
pipe
(
gulp
.
dest
(
wwwPath
)),
// Remove unused JS code + add ng annotations
...
...
This diff is collapsed.
Click to expand it.
hooks/after_prepare/040_useref.js
+
4
−
7
View file @
3791729f
...
...
@@ -7,8 +7,6 @@ const gulp = require('gulp'),
filter
=
require
(
'
gulp-filter
'
),
uglify
=
require
(
'
gulp-uglify-es
'
).
default
,
csso
=
require
(
'
gulp-csso
'
),
rev
=
require
(
'
gulp-rev
'
),
revReplace
=
require
(
'
gulp-rev-replace
'
),
log
=
require
(
'
fancy-log
'
),
colors
=
require
(
'
ansi-colors
'
);
...
...
@@ -42,9 +40,9 @@ if (rootdir && !skip) {
let
indexPath
=
path
.
join
(
wwwPath
,
'
index.html
'
);
const
indexFilter
=
filter
(
'
**/index.html
'
,
{
restore
:
true
});
const
jsFilter
=
filter
([
'
**/*.js
'
,
'
!**/vendor/*
'
,
'
!**/config.js
'
],
{
restore
:
true
});
const
cssFilter
=
filter
(
'
**/*.css
'
,
{
restore
:
true
});
const
revFilesFilter
=
filter
([
'
**/*
'
,
'
!**/index.html
'
,
'
!**/config.js
'
],
{
restore
:
true
});
const
uglifyOptions
=
{
toplevel
:
true
,
warnings
:
true
,
...
...
@@ -69,16 +67,15 @@ if (rootdir && !skip) {
es
.
concat
(
gulp
.
src
(
indexPath
)
.
pipe
(
useref
())
// Concatenate with gulp-useref
.
pipe
(
jsFilter
)
.
pipe
(
uglify
(
uglifyOptions
))
// Minify any javascript sources
.
pipe
(
jsFilter
.
restore
)
.
pipe
(
cssFilter
)
.
pipe
(
csso
())
// Minify any CSS sources
.
pipe
(
cssFilter
.
restore
)
.
pipe
(
revFilesFilter
)
.
pipe
(
rev
())
// Rename the concatenated files (but not index.html)
.
pipe
(
revFilesFilter
.
restore
)
.
pipe
(
revReplace
())
// Substitute in new filenames
.
pipe
(
gulp
.
dest
(
wwwPath
))
);
}
...
...
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