I am pleased to announce the release of calmjs-3.0.0, which supports the generation of webpack artifacts as part of the Python package build through the calmjs.webpack package. Some time ago I had a couple inquiries about webpack support, and it is here now.
I had started this project originally due to increasing amounts of frustration trying to get Plone mockup working in a well-tested manner that actually tests against other browsers that it was supposed to work for. Note that on the CI services, a number of platforms are listed as tested however if one were to look at the logs closely, Firefox/Chrome aren't actually used, but the standard headless browser PhamtomJS was used in every case (I probably should have made a pull request to correct that, but I've grown severely allergic to working with the configuration soup that mockup has after all the time I've spent swimming in the likes of it while building Calmjs).
While mockup from the surface looked like a well-tested, feature-rich library, with the structure pattern looking like a reusable pattern that can be adapted to display any navigation table. Turns out that was not exactly the case, but I was able to make various changes that moved it towards that direction, and the mockup development team had graciously accepted the patches I made towards making that story better, which I am thankful for.
However, the difficulty of the integration dance really bare its fangs when I started building my own extensions to the structure pattern in a separate library that reused mockup. The programming part was not hard, but getting the development environment working with tests running was, at best, mildly annoying. As usual, a number of manual copying/editing and locating needs to be done to configuration files before it works for the development tree, repeat ad nauseam for every package that need to reuse and test against all this work. This situation is untenable, especially if I have to pass this on to other, less experienced programmers that don't know or lack the time to learn all the intricacies of various Node.js build systems (plus this complicated soup with Makefiles, grunt/gulp and whatever else).
Also, given that I found that I will need server side rendering done using the same look and feel and that mockup is client-side only (unless somehow the same view can be rendered through Node.js, but I am not even going to attempt trying to get Plone proxy'd through Node.js), so I started something afresh.
Initially, I built a rendering framework that make use of the commonly known Jinja2 templates (putting this politely, TAL is alien to Python programmers that haven't seen Plone), so both server-side and client-side rendering (through Mozilla nunjucks) can be done using the same template code (it's called nunja, and is very much a work in progress). Then I realised I do really need a reusable toolchain to glue all this stuff together and to build the resulting artifacts, and three months later Calmjs with RequireJS support was done (I thought that was the end, how naive).
calmjs artifact build process which built the webpack, then RequireJS bundle, then karma running against both those bundles using the same tests). Those artifact build/test commands make use of the declarations by these entry points, so they are defined as part of the Python package itself for reuse by other packages (e.g. locating them). Do note that I only just got this checked into CI, so only PhantomJS actually works with both Firefox/Chrome tests appear broken (as I am in the process of ripping out RequireJS specific test setup things, so bunch of skipped tests when running with webpack, and that still doesn't work in real browsers).
Lastly (this post is getting rather long), there are some more points that I want to make/emphasize but I am just going to leave them as a summary note... I guess this is a tl;dr (if it is still too long, oh well, go read it):
easilybe reused outside of their git repo but is critical for the development/build/testing process?)
- Developers should be able to easily run the complete test suites offered by their dependencies against the artifacts produced by their packages to ensure their extensions to the upstream framework did not break any existing functionalities, if they care enough to.