<div dir="ltr">The point of dev installs is for devs to be able to work on the code in a pseudo installed state.  Being able to modify and recompile these JS files would be part of that I think.<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Sep 12, 2017 at 5:11 PM, David Cook <span dir="ltr"><<a href="mailto:dcook@prosentient.com.au" target="_blank">dcook@prosentient.com.au</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div link="blue" vlink="purple" lang="EN-AU"><div class="m_-8454803820301544301WordSection1"><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">I don’t think you’d need to for dev installs, but maybe you would for license requirements. I could see that. Should definitely look into that. <u></u><u></u></span></p><span class=""><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">David Cook<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">Systems Librarian<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">Prosentient Systems<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"><a href="https://maps.google.com/?q=72/330+Wattle+St+Ultimo,+NSW+2007+Australia+%C2%A0+Office:+02&entry=gmail&source=g">72/330 Wattle St</a><u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"><a href="https://maps.google.com/?q=72/330+Wattle+St+Ultimo,+NSW+2007+Australia+%C2%A0+Office:+02&entry=gmail&source=g">Ultimo, NSW 2007</a><u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"><a href="https://maps.google.com/?q=72/330+Wattle+St+Ultimo,+NSW+2007+Australia+%C2%A0+Office:+02&entry=gmail&source=g">Australia</a><u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"><a href="https://maps.google.com/?q=72/330+Wattle+St+Ultimo,+NSW+2007+Australia+%C2%A0+Office:+02&entry=gmail&source=g">Office: 02</a> 9212 0899<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">Direct: 02 8005 0595<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"><u></u> <u></u></span></p></span><p class="MsoNormal"><b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif" lang="EN-US">From:</span></b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif" lang="EN-US"> Michael Hafen [mailto:<a href="mailto:michael.hafen@washk12.org" target="_blank">michael.hafen@washk12.<wbr>org</a>] <br><b>Sent:</b> Wednesday, 13 September 2017 1:51 AM<br><b>To:</b> David Cook <<a href="mailto:dcook@prosentient.com.au" target="_blank">dcook@prosentient.com.au</a>><br><b>Cc:</b> Tomas Cohen Arazi <<a href="mailto:tomascohen@gmail.com" target="_blank">tomascohen@gmail.com</a>>; koha-devel <<a href="mailto:koha-devel@lists.koha-community.org" target="_blank">koha-devel@lists.koha-<wbr>community.org</a>></span></p><div><div class="h5"><br><b>Subject:</b> Re: [Koha-devel] Proposal for ES6 development on the staff client<u></u><u></u></div></div><p></p><div><div class="h5"><p class="MsoNormal"><u></u> <u></u></p><div><p class="MsoNormal">I expect you would also have to ship the client source code for dev installs, and to meet license requirements.  I could be wrong though.<u></u><u></u></p></div><div><p class="MsoNormal"><u></u> <u></u></p><div><p class="MsoNormal">On Mon, Sep 11, 2017 at 5:32 PM, David Cook <<a href="mailto:dcook@prosentient.com.au" target="_blank">dcook@prosentient.com.au</a>> wrote:<u></u><u></u></p><blockquote style="border:none;border-left:solid #cccccc 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-right:0cm"><div><div><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">In that case, the onus would be on the original committer to build once and commit it as a bundle to Koha. I suppose that makes sense. I wonder if there’s any advantage to providing the sources and having people build it themselves. You’d have to do that for server-side code, but I can’t imagine there would be any repercussions in this case since it’s client-side code? </span><u></u><u></u></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"> </span><u></u><u></u></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">David Cook</span><u></u><u></u></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">Systems Librarian</span><u></u><u></u></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">Prosentient Systems</span><u></u><u></u></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"><a href="https://maps.google.com/?q=72/330+Wattle+St+Ultimo,+NSW+2007+Australia+%C2%A0+Office:+02&entry=gmail&source=g">72/330 Wattle St</a></span><u></u><u></u></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"><a href="https://maps.google.com/?q=72/330+Wattle+St+Ultimo,+NSW+2007+Australia+%C2%A0+Office:+02&entry=gmail&source=g">Ultimo, NSW 2007</a></span><u></u><u></u></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"><a href="https://maps.google.com/?q=72/330+Wattle+St+Ultimo,+NSW+2007+Australia+%C2%A0+Office:+02&entry=gmail&source=g">Australia</a></span><u></u><u></u></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"> </span><u></u><u></u></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"><a href="https://maps.google.com/?q=72/330+Wattle+St+Ultimo,+NSW+2007+Australia+%C2%A0+Office:+02&entry=gmail&source=g">Office: 02</a> 9212 0899</span><u></u><u></u></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">Direct: 02 8005 0595</span><u></u><u></u></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"> </span><u></u><u></u></p><p class="MsoNormal"><b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif" lang="EN-US">From:</span></b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif" lang="EN-US"> <a href="mailto:koha-devel-bounces@lists.koha-community.org" target="_blank">koha-devel-bounces@lists.koha-<wbr>community.org</a> [mailto:<a href="mailto:koha-devel-bounces@lists.koha-community.org" target="_blank">koha-devel-bounces@<wbr>lists.koha-community.org</a>] <b>On Behalf Of </b>Tomas Cohen Arazi<br><b>Sent:</b> Monday, 11 September 2017 10:21 PM<br><b>Cc:</b> koha-devel <<a href="mailto:koha-devel@lists.koha-community.org" target="_blank">koha-devel@lists.koha-<wbr>community.org</a>><br><b>Subject:</b> Re: [Koha-devel] Proposal for ES6 development on the staff client</span><u></u><u></u></p><div><div><p class="MsoNormal"> <u></u><u></u></p><div><p class="MsoNormal">If we are bundling the resulting Js, it means when we commit we include the resulting Js.<br>The Makefile itself doesn't need to run those tasks.<u></u><u></u></p></div><p class="MsoNormal"> <u></u><u></u></p><div><div><p class="MsoNormal">On mar., 29 de ago. de 2017 8:50 PM Jesse <<a href="mailto:pianohacker@gmail.com" target="_blank">pianohacker@gmail.com</a>> wrote:<u></u><u></u></p></div><blockquote style="border:none;border-left:solid #cccccc 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-top:5.0pt;margin-right:0cm;margin-bottom:5.0pt"><div><div><div><p class="MsoNormal">2017-08-29 17:33 GMT-06:00 David Cook <<a href="mailto:dcook@prosentient.com.au" target="_blank">dcook@prosentient.com.au</a>>:<u></u><u></u></p><blockquote style="border:none;border-left:solid #cccccc 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-top:5.0pt;margin-right:0cm;margin-bottom:5.0pt"><div><div><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">Thanks for the info, Jesse. I haven’t reviewed Bugzilla or Github, but I just have a couple of questions.</span><u></u><u></u></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"> </span><u></u><u></u></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">If I understand correctly, we’ll be bundling the Javascript packages in with Koha for deployment, is that right?</span><u></u><u></u></p></div></div></blockquote><div><p class="MsoNormal"> <u></u><u></u></p></div></div></div></div><div><div><div><div><p class="MsoNormal">Correct. After being built, all of the necessary JS (our own transpiled code and its dependencies) will be bundled together.<u></u><u></u></p></div></div></div></div><div><div><div><div><p class="MsoNormal"> <u></u><u></u></p></div><blockquote style="border:none;border-left:solid #cccccc 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-top:5.0pt;margin-right:0cm;margin-bottom:5.0pt"><div><div><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"> </span><u></u><u></u></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">If that’s the case, will only the build machine will need Nodejs, npm, yarn, Gulp, Browserify, Babel, etc? If so, then the onus of these additional dependencies is really just for developers or people installing from source? The Debian packages would just the transpiled versions of the Javascript? I imagine that would satisfy the community’s desire to just use upstream packages from Debian?</span><u></u><u></u></p></div></div></blockquote><div><p class="MsoNormal"> <u></u><u></u></p></div></div></div></div><div><div><div><div><p class="MsoNormal">Correct.<u></u><u></u></p></div></div></div></div><div><div><div><div><p class="MsoNormal"> <u></u><u></u></p></div><blockquote style="border:none;border-left:solid #cccccc 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-top:5.0pt;margin-right:0cm;margin-bottom:5.0pt"><div><div><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"> </span><u></u><u></u></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">For those of us who do install from source, would this transpiling process be automated via the Makefile? </span><u></u><u></u></p></div></div></blockquote><div><p class="MsoNormal"> <u></u><u></u></p></div></div></div></div><div><div><div><div><p class="MsoNormal" style="margin-bottom:12.0pt">It easily could be. In my original email, the global install (sudo npm install -g) of yarn was purely for convenience. The entire process could become:<u></u><u></u></p></div><div><p class="MsoNormal">$ sudo apt install nodejs npm # or koha-builddeps or koha-jsdeps (or koha-perldeps if we feel like being lazy)<u></u><u></u></p></div><div><p class="MsoNormal" style="margin-bottom:12.0pt">$ make build-js<u></u><u></u></p></div><div><p class="MsoNormal">Where the Makefile took care of downloading yarn, installing all the JS dependencies, and building the files.<u></u><u></u></p></div></div></div></div><div><div><div><div><p class="MsoNormal"> <u></u><u></u></p></div><blockquote style="border:none;border-left:solid #cccccc 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-top:5.0pt;margin-right:0cm;margin-bottom:5.0pt"><div><div><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"> </span><u></u><u></u></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">David Cook</span><u></u><u></u></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">Systems Librarian</span><u></u><u></u></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">Prosentient Systems</span><u></u><u></u></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"><a href="https://maps.google.com/?q=72/330+Wattle+St+Ultimo,+NSW+2007+Australia+%C2%A0+Office:+02&entry=gmail&source=g">72/330 Wattle St</a></span><u></u><u></u></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"><a href="https://maps.google.com/?q=72/330+Wattle+St+Ultimo,+NSW+2007+Australia+%C2%A0+Office:+02&entry=gmail&source=g">Ultimo, NSW 2007</a></span><u></u><u></u></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"><a href="https://maps.google.com/?q=72/330+Wattle+St+Ultimo,+NSW+2007+Australia+%C2%A0+Office:+02&entry=gmail&source=g">Australia</a></span><u></u><u></u></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"> </span><u></u><u></u></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"><a href="https://maps.google.com/?q=72/330+Wattle+St+Ultimo,+NSW+2007+Australia+%C2%A0+Office:+02&entry=gmail&source=g">Office: 02</a> 9212 0899</span><u></u><u></u></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">Direct: 02 8005 0595</span><u></u><u></u></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"> </span><u></u><u></u></p><p class="MsoNormal"><b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif" lang="EN-US">From:</span></b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif" lang="EN-US"> <a href="mailto:koha-devel-bounces@lists.koha-community.org" target="_blank">koha-devel-bounces@lists.koha-<wbr>community.org</a> [mailto:<a href="mailto:koha-devel-bounces@lists.koha-community.org" target="_blank">koha-devel-bounces@<wbr>lists.koha-community.org</a>] <b>On Behalf Of </b>Jesse<br><b>Sent:</b> Wednesday, 30 August 2017 7:27 AM<br><b>To:</b> <a href="mailto:koha-devel@lists.koha-community.org" target="_blank">koha-devel@lists.koha-<wbr>community.org</a><br><b>Subject:</b> [Koha-devel] Proposal for ES6 development on the staff client</span><u></u><u></u></p><div><div><p class="MsoNormal"> <u></u><u></u></p><div><div><div><div><div><div><div><div><div><div><div><p class="MsoNormal"> <u></u><u></u></p></div><p class="MsoNormal" style="margin-bottom:12.0pt">As part of my work on bug 15522 <<a href="https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15522" target="_blank">https://bugs.koha-community.<wbr>org/bugzilla3/show_bug.cgi?id=<wbr>15522</a>>, I've been working with Preact (a React clone with a friendlier license). We've established that this needs ES6[1] in previous discussions on the mailing list and in IRC. From there, we found IE's many limitations meant we needed a transpiler[2] to to make use of these features.<u></u><u></u></p></div><p class="MsoNormal" style="margin-bottom:12.0pt">Owen and I have been thinking about the easiest way to do this, and this is the lowest-friction process we've come up with to transpile ES6:<u></u><u></u></p></div><p class="MsoNormal">$ sudo apt-get install nodejs npm<u></u><u></u></p></div><p class="MsoNormal">$ sudo npm install -g yarn<u></u><u></u></p></div><p class="MsoNormal">$ yarn install<u></u><u></u></p></div><p class="MsoNormal" style="margin-bottom:12.0pt">$ yarn build<u></u><u></u></p></div><p class="MsoNormal" style="margin-bottom:12.0pt">Yarn is a somewhat faster version of npm, the de-facto JavaScript package manager. Normally, this would be a pointless addition, but the npm in the Debian repositories is 3 major versions out of date, and therefore not a great option. Many npm packages simply fail to install.<u></u><u></u></p></div><p class="MsoNormal" style="margin-bottom:12.0pt">This is a constant problem with the JS packages in the Debian repos; most if not all of the tools that one might want either are completely unpackaged or woefully out of date. Packaging them ourselves means working our way through a number of dependencies (see [3] for an example). Any frontend build process worth our time cannot solely use packages from the upstream repos.<u></u><u></u></p></div><p class="MsoNormal" style="margin-bottom:12.0pt">That aside, this build process will use Gulp, Browserify and Babel to take any files in koha-tmpl/intranet-tmpl/prog/<wbr>js/src, and compile them into a matching file in koha-tmpl/intranet-tmpl/prog/<wbr>js/built . This means that any new files will not have to be manually whitelisted.<u></u><u></u></p></div><p class="MsoNormal">You can see a working example at <a href="https://github.com/pianohacker/koha" target="_blank">https://github.com/<wbr>pianohacker/koha</a>, branch bz15522. I'm currently committing the built versions of the files, but this is purely for convenience of prototyping. The page in question is admin/<a href="http://policy.pl" target="_blank">policy.pl</a>, and the relevant code is at .../prog/js/src/admin/policy.<wbr>js .<u></u><u></u></p><div><div><div><div><div><div><div><div><div><div><div><div><p class="MsoNormal"> <u></u><u></u></p></div><div><p class="MsoNormal">[1] ECMAScript 6, a semi-recent version of JavaScript with a large number of new features, including a nice class syntax, arrow functions, and destructuring assignment.<u></u><u></u></p></div><div><p class="MsoNormal">[2] A tool that transforms ES6 syntax (and the JSX syntax extension used by (P)react) into something that can be run by older browsers, including IE.<br>[3] <a href="https://wiki.debian.org/Javascript/Nodejs/Tasks/gulp" target="_blank">https://wiki.debian.org/<wbr>Javascript/Nodejs/Tasks/gulp</a><u></u><u></u></p></div></div></div></div></div></div></div></div></div></div></div></div><p class="MsoNormal"><br clear="all"><br>-- <u></u><u></u></p><div><p class="MsoNormal">Jesse Weaver<u></u><u></u></p></div></div></div></div></div></div></blockquote></div></div></div><div><div><p class="MsoNormal"><br><br clear="all"><br>-- <u></u><u></u></p><div><p class="MsoNormal">Jesse Weaver<u></u><u></u></p></div></div></div><p class="MsoNormal">______________________________<wbr>_________________<br>Koha-devel mailing list<br><a href="mailto:Koha-devel@lists.koha-community.org" target="_blank">Koha-devel@lists.koha-<wbr>community.org</a><br><a href="http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel" target="_blank">http://lists.koha-community.<wbr>org/cgi-bin/mailman/listinfo/<wbr>koha-devel</a><br>website : <a href="http://www.koha-community.org/" target="_blank">http://www.koha-community.org/</a><br>git : <a href="http://git.koha-community.org/" target="_blank">http://git.koha-community.org/</a><br>bugs : <a href="http://bugs.koha-community.org/" target="_blank">http://bugs.koha-community.<wbr>org/</a><u></u><u></u></p></blockquote></div><div><p class="MsoNormal">-- <u></u><u></u></p></div><div><div><div><p class="MsoNormal"><span style="font-size:9.5pt;font-family:"Helvetica",sans-serif;color:#757575">Tomás Cohen Arazi</span><u></u><u></u></p></div><div><p class="MsoNormal"><span style="font-size:9.5pt;font-family:"Helvetica",sans-serif;color:#757575">Theke Solutions (<a href="http://theke.io/" target="_blank">https://theke.io</a>)<br></span><span style="font-size:9.5pt;font-family:"Segoe UI Symbol",sans-serif;color:#757575">✆</span><span style="font-size:9.5pt;font-family:"Helvetica",sans-serif;color:#757575"> <a href="tel:+54%209%20351%20351-3384" target="_blank">+54 9351 3513384</a><br>GPG: B2F3C15F</span><u></u><u></u></p></div></div></div></div></div></div></div><p class="MsoNormal"><br>______________________________<wbr>_________________<br>Koha-devel mailing list<br><a href="mailto:Koha-devel@lists.koha-community.org" target="_blank">Koha-devel@lists.koha-<wbr>community.org</a><br><a href="http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel" target="_blank">http://lists.koha-community.<wbr>org/cgi-bin/mailman/listinfo/<wbr>koha-devel</a><br>website : <a href="http://www.koha-community.org/" target="_blank">http://www.koha-community.org/</a><br>git : <a href="http://git.koha-community.org/" target="_blank">http://git.koha-community.org/</a><br>bugs : <a href="http://bugs.koha-community.org/" target="_blank">http://bugs.koha-community.<wbr>org/</a><u></u><u></u></p></blockquote></div><p class="MsoNormal"><br><br clear="all"><br>-- <u></u><u></u></p><div><div><div><div><div><div><p class="MsoNormal">Michael Hafen<u></u><u></u></p></div><p class="MsoNormal">Washington County School District Technology Department<u></u><u></u></p></div><p class="MsoNormal" style="margin-bottom:12.0pt">Systems Analyst<u></u><u></u></p></div></div></div></div></div></div></div></div></div></blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div>Michael Hafen<br></div>Washington County School District Technology Department<br></div>Systems Analyst<br><br></div></div></div></div>
</div>