Feedback requested: improving Infusion's NPM package for end users in the short term

Harnum, Alan aharnum at ocadu.ca
Thu Aug 18 14:53:51 UTC 2016


The essential issue is that as currently stands Infusion's build process and publication to NPM makes it less than friendly for use in automating build processes for front-end (in-browser) use.

- PR comment that started this thread of conversation: https://github.com/fluid-project/myl3/pull/1#discussion_r75114980
- Relevant IRC chat start: https://botbot.me/freenode/fluid-work/2016-08-17/?msg=71467811&page=1

The long-term remedy for this may be making Infusion work well with the current generation of front-end build tools like Browserify or web pack, but in the more immediate term, it was proposed to estimate the effort to produce a distribution structure like the following gist as part of the published NPM package: https://gist.github.com/waharnum/4d1f3845ce6b8dc7ed6d4c9dcd23f69e.

Many NPM libraries that can be used in-browser include a `/dist` directory or similar that contains a selection of suitable (concatenated / minified / etc) front-end artifacts. The proposed structure above tries to more easily accommodate two basic use cases:

  *   applications with in-browser Infusion as a dependency that only wish to use the framework pieces (both with and without the jQuery dependency)
  *   applications with in-browser Infusion as a dependency that wish to additionally use various interface components that include JS along with HTML, images and CSS assets

Per previous discussion in March (http://lists.idrc.ocad.ca/pipermail/fluid-work/2016-March/009894.html), my various browser-based (non-node) projects with Infusion + 3rd party libraries as dependencies uses NPM + grunt only to manage the "install" process; Infusion itself is, for the reasons stated in the PR comment above, resistant to this approach, and continues to be checked in directly as a dependency. We'd like to address this, and it seems better to spend a little time doing so at the root of the issue than for me to do so via grunt in each of my projects.

Comments are invited about the approach/goal described above – there is some discussion about trying to accomplish this for the Infusion 2.0 release. Justin O & I discussed & think it might be possible to achieve it relatively quickly using existing build tools.

ALAN HARNUM
SENIOR INCLUSIVE DEVELOPER
INCLUSIVE DESIGN RESEARCH CENTRE, OCAD UNIVERSITY

E aharnum at ocadu.ca<mailto://aharnum@ocadu.ca>

OCAD UNIVERSITY
100 McCaul Street, Toronto, Canada, M5T 1W1
www.ocadu.ca<http://ocadu.ca/>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.idrc.ocad.ca/pipermail/fluid-work/attachments/20160818/fa535272/attachment.htm>


More information about the fluid-work mailing list