Closed alexrobin closed 7 years ago
Cannot be reproduced, here what it gives me:
osh-js/Toolkit $ ls dist
ls: cannot access 'dist': No such file or directory
osh-js/Toolkit $ gulp build --cesium
[17:55:21] Using gulpfile osh-js/Toolkit/gulpfile.js
[17:55:21] Starting 'vendor-js-src-all'...
[17:55:21] Starting 'vendor-css-src-all'...
[17:55:21] Starting 'osh-js-src'...
[17:55:21] Starting 'copy-fonts'...
[17:55:21] Starting 'copy-vendor'...
[17:55:21] Finished 'copy-vendor' after 1.03 ms
[17:55:21] Starting 'images'...
[17:55:21] Finished 'vendor-css-src-all' after 24 ms
[17:55:21] Finished 'vendor-js-src-all' after 117 ms
[17:55:21] Finished 'images' after 126 ms
[17:55:21] Finished 'osh-js-src' after 164 ms
[17:55:21] Finished 'copy-fonts' after 163 ms
[17:55:21] Starting 'osh-css-src'...
[17:55:21] Finished 'osh-css-src' after 8.22 ms
[17:55:21] Starting 'normal'...
[17:55:21] Finished 'normal' after 6.15 μs
[17:55:21] Starting 'minify'...
[17:55:21] Finished 'minify' after 4.88 ms
[17:55:21] Starting 'build'...
[17:55:21] Finished 'build' after 5.25 μs
osh-js/Toolkit $ ls dist/vendor/cesium/
Assets/ Cesium.js ThirdParty/ Widgets/ Workers/
osh-js/Toolkit $ ls dist/vendor/cesium/Widgets/
Animation CesiumInspector FullscreenButton Images lighter.css NavigationHelpButton SceneModePicker shared.css Viewer widgets.css
BaseLayerPicker CesiumWidget Geocoder InfoBox lighterShared.css PerformanceWatchdog SelectionIndicator Timeline VRButton
but do you have something inside the Animation folder for instance?
osh-js/Toolkit $ ls dist/vendor/cesium/Widgets/Animation/
Animation.css lighter.css
By the way gulp use some regex to get files and copy them to another directory like for Cesium:
if(argv.cesium) {
gulp.src('vendor/cesium.js/dist/**/*')
.pipe(gulp.dest('dist/vendor/cesium'));
}
Maybe the regex differ from the shell you are using ? If so I will check the right way provided by gulp to do that
maybe so; I tried a build again and anything under the first level is just empty folders
So to summarize all subfolders of the 'Assets', 'Thirdparty', 'Widgets' folders are empty
Gulp seems to use glob-node, so nothing to do with user shell: https://github.com/isaacs/node-glob
Try to replace into the gulpfile.js (line 255): this:
if(argv.cesium) {
gulp.src('vendor/cesium.js/dist/**/*')
.pipe(gulp.dest('dist/vendor/cesium'));
}
by this:
if(argv.cesium) {
gulp.src('vendor/cesium.js/dist/**/**')
.pipe(gulp.dest('dist/vendor/cesium'));
}
It gives me the same result and it may works for you
This because of the glob-node documentation:
The following characters have special magic meaning when used in a path portion:
* Matches 0 or more characters in a single path portion
? Matches 1 character
[...] Matches a range of characters, similar to a RegExp range. If the first character of the range is ! or ^ then it matches any character not in the range.
!(pattern|pattern|pattern) Matches anything that does not match any of the patterns provided.
?(pattern|pattern|pattern) Matches zero or one occurrence of the patterns provided.
+(pattern|pattern|pattern) Matches one or more occurrences of the patterns provided.
*(a|b|c) Matches zero or more occurrences of the patterns provided
@(pattern|pat*|pat?erN) Matches exactly one of the patterns provided
** If a "globstar" is alone in a path portion, then it matches zero or more directories and subdirectories searching for matches. It does not crawl symlinked directories.
I made some changes onto the gulpfile. Try to update and close the issue if it solves the problem. Now every task returns at least 1 stream.
When packaging a version with
gulp build --cesium
most files are missing from the cesium subfolders (for examples subfolders of the Widgets folder are empty)