CDLUC3 / stash

A UC3 application framework for storing and sharing research data
MIT License
6 stars 4 forks source link

Can't build UI library demo with gulp #5

Open dmolesUC opened 6 years ago

dmolesUC commented 6 years ago

Following the instructions in the UI Library README, gulp build failed trying to find a nonexistent main.css file in a nonexistent css directory. Maybe there's a missing step somewhere to compile SASS to CSS?

$ gulp build
[12:51:23] Using gulpfile ~/Work/stash/stash_engine/gulpfile.js
[12:51:23] Starting 'build'...
[12:51:23] Starting 'clean'...
[12:51:23] Finished 'clean' after 13 ms
[12:51:23] Starting 'scss-lint'...
[12:51:23] Starting 'js-lint'...
[12:51:23] Starting 'sass'...
[12:51:23] Starting 'useref'...
[12:51:23] Starting 'icons'...
[12:51:23] Starting 'copy-images'...
[12:51:23] Starting 'copy-fonts'...
events.js:167
      throw er; // Unhandled 'error' event
      ^

Error: Error: File not found with singular glob: /Users/dmoles/Work/stash/stash_engine/ui-library/css/main.css (if this was purposeful, use `allowEmpty` option)
    at DestroyableTransform.<anonymous> (/Users/dmoles/Work/stash/stash_engine/node_modules/gulp-useref/index.js:67:32)
    at DestroyableTransform.emit (events.js:182:13)
    at Pumpify.emit (events.js:182:13)
    at Pumpify.Duplexify._destroy (/Users/dmoles/Work/stash/stash_engine/node_modules/duplexify/index.js:191:15)
    at /Users/dmoles/Work/stash/stash_engine/node_modules/duplexify/index.js:182:10
    at process._tickCallback (internal/process/next_tick.js:61:11)
Emitted 'error' event at:
    at DestroyableTransform.onerror (/Users/dmoles/Work/stash/stash_engine/node_modules/vinyl-fs/node_modules/readable-stream/lib/_stream_readable.js:558:12)
    at DestroyableTransform.emit (events.js:182:13)
    at DestroyableTransform.<anonymous> (/Users/dmoles/Work/stash/stash_engine/node_modules/gulp-useref/index.js:67:18)
    at DestroyableTransform.emit (events.js:182:13)
    [... lines matching original stack trace ...]
    at process._tickCallback (internal/process/next_tick.js:61:11)
dmolesUC commented 6 years ago

As a workaround, I used sassc to compile main.scss:

$ mkdir ui-library/css
$ sassc ui-library/scss/main.scss > ui-library/css/main.css
$ gulp build
[12:56:21] Using gulpfile ~/Work/stash/stash_engine/gulpfile.js
[12:56:21] Starting 'build'...
[12:56:21] Starting 'clean'...
[12:56:21] Finished 'clean' after 30 ms
[12:56:21] Starting 'scss-lint'...
[12:56:21] Starting 'js-lint'...
[12:56:21] Starting 'sass'...
[12:56:21] Starting 'useref'...
[12:56:21] Starting 'icons'...
[12:56:21] Starting 'copy-images'...
[12:56:21] Starting 'copy-fonts'...
[12:56:21] Finished 'js-lint' after 240 ms
[12:56:21] Finished 'icons' after 393 ms
[12:56:21] Finished 'copy-fonts' after 394 ms
[12:56:22] Finished 'sass' after 1.22 s
[12:56:22] Finished 'copy-images' after 1.44 s
[12:56:23] Finished 'useref' after 1.9 s
[12:56:23] Finished 'scss-lint' after 2.36 s
[12:56:23] Starting 'copy-to-assets'...
[12:56:23] Finished 'copy-to-assets' after 21 ms
[12:56:23] Finished 'build' after 2.41 s
$ open public/demo/index.html

👍