Make lumX available via npm with browserify
See original GitHub issueFirst of all, I’d like to say thank you for this project. It is already far better than angular-material (widget set, look out of the box, performance) and hopefully will continue to improve.
I would love to be able to use lumx via npm+browserify, without bower. It’s rather unfortunate that there is no consensus on packaging and dependency management for the frontend development. It appears (to my novice eye) that npm+browserify and bower are two top choices at the moment, and it also appears that npm and browserify are both very versatile and ready to evolve to support frontend more while bower is rather naive (nothing wrong with that, it’s just that it doesn’t do enough).
Initially I started my new project with angular-material and I was able to get all javascript dependencies set up with browserify, having single <script>
element in index.html to load browserify-produced bundle.
I found angluIar-material lacking and was very glad to discover lumX. Trying to set it up with browserify I ran into to two problems. One of course is the topic of this issue - lumX doesn’t seem to be available as npm module. Another is that even though all lumX’s dependencies are available as npm modules, velocity.js (‘velocity-animate’ in npm registry) is expected to be a jquery plugin (dropdown menu element is looking for .velocity() method) and for some reason velocity doesn’t register as jquery plugin when these components are loaded via browserify’s require()
. It appears that velocity.js itself no longer requires jquery and mere “presence” of jquery doesn’t make it register as plugin.
I was able to get lumX (0.2.11) to work by adding all the dependencies as <script>
elements, but using <script>
and relying on browser globals feels like a step backwards compared to using modules with require()
.
Issue Analytics
- State:
- Created 9 years ago
- Comments:38 (6 by maintainers)
Top GitHub Comments
No worries, but indeed I just discover this https://github.com/bower/bower/issues/2298 cc @malexandre I think this should be a good enough reason for lumX to be on NPM as well no ?
For info, lumx is now available on npm: https://www.npmjs.com/package/official-lumx
😮