[OPEN-ILS-DEV] A note about browser staff webpack integration

Bill Erickson berickxx at gmail.com
Wed Feb 21 15:11:08 EST 2018


Hi,

As of a few minutes ago, we have replaced Grunt with Webpack in the
browser client:

https://bugs.launchpad.net/evergreen/+bug/1739803

For anyone modifying JS code in the browser client, this may impact
how you deploy code changes.  At the risk of repeating everything in
the bug, I'll cut to the import part.

This has no impact on users installing release packages or using make-install.

If you code by modifying JS files then copying the JS files wholesale
into the web dir to avoid the lengthy make/make-install process, then
you'll have to add an intermediate step to your development process.

1. Modify some JS files
2. $ npm run build
3. Copy files into place.

Step 2 is needed because the templates import bundles of script files,
instead of individual script files, and those bundles have to be
generated from your modified JS files.

To speed up the above, it's also possible to open a second terminal to
your dev server, navigate to the web staff JS directory, and run this:

$ npm run build-watch

This automates step #2 from above, forcing the build to re-run every
time an affected file is changed.  This changes the above steps to:

1. Modify some JS files
2. Count to 5 while the auto-build completes
3. Copy files into place.

And finally, we are only bundling dependency files and core service
files at the moment.  So the additional steps are only required when
change core service files.  However, this may change going forward to
include non-core files.

====

Also, after you git pull from master, I suggest the following:

$ cd Open-ILS/web/js/ui/default/staff
$ npm update
$ npm run build
$ npm run test

-b


More information about the Open-ils-dev mailing list