Summary: | Update gulpfile to work with Node.js v12 | ||
---|---|---|---|
Product: | Koha | Reporter: | Tomás Cohen Arazi (tcohen) <tomascohen> |
Component: | Architecture, internals, and plumbing | Assignee: | Tomás Cohen Arazi (tcohen) <tomascohen> |
Status: | CLOSED FIXED | QA Contact: | Testopia <testopia> |
Severity: | normal | ||
Priority: | P5 - low | CC: | agustinmoyano, aleisha, jonathan.druart, kyle, martin.renvoize, mtj, oleonard, victor |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
See Also: | https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34376 | ||
Change sponsored?: | --- | Patch complexity: | Small patch |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: |
20.11.00, 20.05.04, 19.11.10
|
|
Circulation function: | |||
Attachments: |
Bug 26228: Update gulpfile to work with Node.js v12
Bug 26228: Update gulpfile to work with Node.js v12 Bug 26228: Update gulpfile to work with Node.js v12 Bug 26228: Update gulpfile to work with Node.js v12 |
Description
Tomás Cohen Arazi (tcohen)
2020-08-17 14:24:55 UTC
Created attachment 108402 [details] [review] Bug 26228: Update gulpfile to work with Node.js v12 This patch makes the gulpfile work with gulp v4 on Node v12. To test it, make sure your dev env has Node.js v12. On both KTD and KohaDevBox edit your sources.list so the node line points to 'node_12.x' instead of 'node_8.x'. Once that's done: 1. On your clone run: $ yarn install $ npm install -E 2. Build the CSS: $ yarn build $ yarn build --view opac => SUCCESS: Things build correctly 3. Sign off :-D Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> I'm not on the Node.js camp but I rewrote the gulpfile.js following the Gulp v4 docs and it is pretty trivial. It works 'as it used to', so not a big deal IMHO. I removed the try/catch block that actually hides problems (if gulp cannot be loaded it will actually explode saying so, so...). TODO: gulp-util says it is deprecated and should be avoided. It's been like that for a while. They recommend minimist, but I didn't manage to make it work with our yarn build setup. Worth doing some short research on the subject. Created attachment 108403 [details] [review] Bug 26228: Update gulpfile to work with Node.js v12 This patch makes the gulpfile work with gulp v4 on Node v12. To test it, make sure your dev env has Node.js v12. It also replaces the use of 'gulp-util' (deprecated) by 'minimist' as recommended on their site. On both KTD and KohaDevBox edit your sources.list so the node line points to 'node_12.x' instead of 'node_8.x'. Once that's done: 1. On your clone run: $ yarn install $ npm install -E 2. Build the CSS: $ yarn build $ yarn build --view opac => SUCCESS: Things build correctly 3. Sign off :-D Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> (In reply to Tomás Cohen Arazi from comment #2) > TODO: gulp-util says it is deprecated and should be avoided. It's been like > that for a while. They recommend minimist, but I didn't manage to make it > work with our yarn build setup. Worth doing some short research on the > subject. ^^ dealt with. We now use 'minimist'. yarn build displays this warning: info fsevents@1.2.13: The platform "linux" is incompatible with this module. info "fsevents@1.2.13" is an optional dependency and failed compatibility check. Excluding it from installation. yarn install, not yarn build Created attachment 108407 [details] [review] Bug 26228: Update gulpfile to work with Node.js v12 This patch makes the gulpfile work with gulp v4 on Node v12. To test it, make sure your dev env has Node.js v12. It also replaces the use of 'gulp-util' (deprecated) by 'minimist' as recommended on their site. On both KTD and KohaDevBox edit your sources.list so the node line points to 'node_12.x' instead of 'node_8.x'. Once that's done: 1. On your clone run: $ yarn install $ npm install -E 2. Build the CSS: $ yarn build $ yarn build --view opac => SUCCESS: Things build correctly 3. Sign off :-D Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Owen Leonard <oleonard@myacpl.org> Created attachment 108411 [details] [review] Bug 26228: Update gulpfile to work with Node.js v12 This patch makes the gulpfile work with gulp v4 on Node v12. To test it, make sure your dev env has Node.js v12. It also replaces the use of 'gulp-util' (deprecated) by 'minimist' as recommended on their site. On both KTD and KohaDevBox edit your sources.list so the node line points to 'node_12.x' instead of 'node_8.x'. Once that's done: 1. On your clone run: $ yarn install $ npm install -E 2. Build the CSS: $ yarn build $ yarn build --view opac => SUCCESS: Things build correctly 3. Sign off :-D Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Pushed to master for 20.11, thanks to everybody involved! backported to 20.05.x for 20.05.04 (doing comment for Lucas) backported to 19.11.x for 19.11.10 > This patch makes the gulpfile work with gulp v4 on Node v12. To test it, > make sure your dev env has Node.js v12. > On both KTD and KohaDevBox edit your sources.list so the node line > points to 'node_12.x' instead of 'node_8.x'. IIUC this means KTD needs also a patch to use node 12 to avoid having to do such a manual operation at every start of the environment. Is that correct? Previous message ↑ in the context of backporting to 19.05.x but also to know if for the other branches, SCSS compilation is now more complicated than before. |