[Bug 17241] New: Start using Bower for installing and managing Koha' s JavaScript Dependencies
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17241 Bug ID: 17241 Summary: Start using Bower for installing and managing Koha's JavaScript Dependencies Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Architecture, internals, and plumbing Assignee: gmcharlt@gmail.com Reporter: kyle@bywatersolutions.com QA Contact: testopia@bugs.koha-community.org Bower is a modern web development tool to make installing, updating and managing JavaScript dependencies easy and is a good best-practice tool to use. As such, we should make use of Bower and begin putting our external library dependencies under the control of bower. We can start with something very simple; using bower to manage requirejs. This patch will switch to using a bower install version of requirejs that is the same version of requirejs we are already using. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17241 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|gmcharlt@gmail.com |kyle@bywatersolutions.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17241 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff Patch complexity|--- |Trivial patch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17241 --- Comment #1 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 55139 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=55139&action=edit Bug 17241 - Start using Bower for installing and managing Koha's JavaScript Dependencies -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17241 --- Comment #2 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 55140 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=55140&action=edit Bug 17241 - Replace existing version of requirejs with bower installed requirejs Test Plan: 1) Apply this patch set 2) Enable the advancedMARCeditor system preference 3) Attempt to edit a MARC record using the advanced editor 4) The editor should continue to load and function as previously -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17241 --- Comment #3 from Kyle M Hall <kyle@bywatersolutions.com> --- Also, if you want to play with Bower, installing it on Debian is pretty trivial: sudo apt-get install nodejs npm sudo ln -s /usr/bin/nodejs /usr/bin/node # Most node packages look for node, not nodejs sudo npm install bower -g Because we have separate lib directories on the staff and opac side, they will need to be managed separately ( unless we decide to unify them at some point ). This patch starts with the staff side. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17241 Andrew Isherwood <andrew.isherwood@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |andrew.isherwood@ptfs-europ | |e.com --- Comment #4 from Andrew Isherwood <andrew.isherwood@ptfs-europe.com> --- Agreed that Bower is indeed a useful tool. In our case, does it offer any significant benefit over using npm to manage JS deps? Just asking the question, I'm a long time user of Bower and, while I don't love it, it does the job perfectly adequately. (First ever comment - hurrah!) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17241 --- Comment #5 from Owen Leonard <oleonard@myacpl.org> --- Would Bower supplement Webpack, or work with it somehow? If the latter, in what way does it build on what Webpack does? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17241 --- Comment #6 from Andrew Isherwood <andrew.isherwood@ptfs-europe.com> --- Bower and npm both enable the management of JS packages and their dependencies, so one of those would be what we use to actually get and maintain the packages. Webpack, as I understand it, would enable us to pack up all our JS packages in an easily deliverable form (e.g. concatenated & minified). So, as I understand it, a front-end build process would require one of either Bower or npm AND Webpack. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17241 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |martin.renvoize@ptfs-europe | |.com --- Comment #7 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- https://www.quora.com/Why-use-Bower-when-there-is-npm makes for an interesting read around this exact topic -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17241 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #55139|0 |1 is obsolete| | --- Comment #8 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 68160 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=68160&action=edit Bug 17241 - Start using Bower for installing and managing Koha's JavaScript Dependencies -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17241 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #55140|0 |1 is obsolete| | --- Comment #9 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 68161 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=68161&action=edit Bug 17241 - Replace existing version of requirejs with bower installed requirejs Test Plan: 1) Apply this patch set 2) Enable the advancedMARCeditor system preference 3) Attempt to edit a MARC record using the advanced editor 4) The editor should continue to load and function as previously Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17241 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off CC| |katrin.fischer@bsz-bw.de, | |oleonard@myacpl.org --- Comment #10 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- This works nicely and I am signing off in order to get some attention to this. - How would using Bower change our processes? - What would be the next steps? - Add as a topic to next dev meeting? Also adding Owen in CC -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17241 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |In Discussion CC| |m.de.rooy@rijksmuseum.nl --- Comment #11 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Thinks this needs more discussion. Please put it on the agenda of a dev meeting. Why should we use it in view of the arguments listed in comment7's link ? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17241 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|In Discussion |Signed Off --- Comment #12 from Kyle M Hall <kyle@bywatersolutions.com> --- (In reply to Martin Renvoize from comment #7)
https://www.quora.com/Why-use-Bower-when-there-is-npm makes for an interesting read around this exact topic
That argument assumes we are using something like webpack, which we do not. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17241 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |In Discussion --- Comment #13 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- (In reply to Marcel de Rooy from comment #11)
Thinks this needs more discussion. Please put it on the agenda of a dev meeting.
Agree with Marcel, I think we need to talk about possible next steps. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17241 Victor Grousset/tuxayo <victor.grousset@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |victor.grousset@biblibre.co | |m --- Comment #14 from Victor Grousset/tuxayo <victor.grousset@biblibre.com> --- Hi, Does now that we use Yarn [1] changes something in regard to this proposal? https://wiki.koha-community.org/wiki/Working_with_staff_client_SCSS [1] and looking at the instructions, and package.json, it seems that npm and gulp are also there as dependencies. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17241 --- Comment #15 from Owen Leonard <oleonard@myacpl.org> --- Looks like the developers of Bower are are recommending that people not choose Bower: "As you might have noticed, we started recommending Yarn as an alternative to Bower for new front-end projects" https://bower.io/blog/2017/how-to-migrate-away-from-bower/ I think that makes this bug "wontfix," but I do think we need to formulate a plan that achieves the goals of this bug using some other process. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17241 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|In Discussion |RESOLVED Resolution|--- |WONTFIX --- Comment #16 from Kyle M Hall <kyle@bywatersolutions.com> --- Agreed. I imagine Yarn is probably the way to go. (In reply to Owen Leonard from comment #15)
Looks like the developers of Bower are are recommending that people not choose Bower:
"As you might have noticed, we started recommending Yarn as an alternative to Bower for new front-end projects" https://bower.io/blog/2017/how-to-migrate-away-from-bower/
I think that makes this bug "wontfix," but I do think we need to formulate a plan that achieves the goals of this bug using some other process.
-- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17241 Andrew Isherwood <bugzilla@warmlight.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- CC|bugzilla@warmlight.co.uk | -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org