STARTER.libraries.yml points to "js/scripts.js" instead of "js/js-src/scripts.js"
| Comment | File | Size | Author |
|---|---|---|---|
| #18 | fixed-watch-js-path.patch | 695 bytes | finex |
STARTER.libraries.yml points to "js/scripts.js" instead of "js/js-src/scripts.js"
| Comment | File | Size | Author |
|---|---|---|---|
| #18 | fixed-watch-js-path.patch | 695 bytes | finex |
Comments
Comment #2
kevinquillen commentedThis is because the Gulpfile will minify/compress that file to js/scripts.js when ran.
I don't think it is necessarily a bug.
Comment #3
ahwebd commentedthis leads us to discover a misplacement of directory js-src in starter subtheme, it should be placed in STARTER directory instead of STARTER /js (alternatively we can make path adjustments in Gulpfile.js)
Comment #4
kevinquillen commentedWhat is the issue again here exactly? That the file doesn't exist until you run Gulp?
Comment #5
ahwebd commentedGulp does not process js, because the path given to gulp.src is './js-src/*.js' but this path does not exist.
Comment #6
kevinquillen commentedMy bad. I have pushed a fix to dev.
Comment #7
kevinquillen commentedComment #9
finex commentedHi, probably something went wrong because the bug is not yet fixed, I've tested both -dev and stable release, the path on Gulpfile.js is still wrong.
Thanks.
Comment #10
kevinquillen commentedComment #11
kevinquillen commentedComment #12
kevinquillen commentedFiNeX, I have reviewed the Gulpfile and it it appears to contain the changes mentioned above.
After running gulp or gulp compress, it should generate a scripts.js file in subtheme/js/scripts.js. I just tried it with 8.x-1.x-dev and a fresh subtheme.
Comment #13
finex commentedOk, thanks!
Comment #14
kevinquillen commentedJust to clarify, that is the generated, uglified output of js/js-src/*.js. That is what you would edit.
Comment #15
kevinquillen commentedComment #16
kevinquillen commentedComment #17
finex commentedHi Kevin.
I've re-checked the 8.x-1.x-dev. The "compress" task is ok. The "watch" task still contains a wrong path.
The current code is:
gulp.watch(['js-src/**/*.js'], ['compress', 'drush:cc']);It should be:
gulp.watch(['js/js-src/**/*.js'], ['compress', 'drush:cc']);Thanks :-)
Comment #18
finex commentedSimple patch to -dev version.
Comment #21
kevinquillen commentedHuh weird, that seeped back into the repo somehow on both versions. I've changed both.
Comment #22
kevinquillen commentedComment #23
kevinquillen commentedComment #24
kevinquillen commentedFurther discussions on the js folder are happening here:
#2511612: Javascript doesn't have a source folder and gets minified
Comment #25
finex commentedThanks Kevin!
Comment #26
rovoI had the same issue in neato 7.x-1.2+4-dev
#17 resolved the issue for me.