question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Make lumX available via npm with browserify

See original GitHub issue

First 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:closed
  • Created 9 years ago
  • Comments:38 (6 by maintainers)

github_iconTop GitHub Comments

3reactions
ghostcommented, May 22, 2017

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 ?

1reaction
arnaudvallecommented, Jan 4, 2018

For info, lumx is now available on npm: https://www.npmjs.com/package/official-lumx

😮

Read more comments on GitHub >

github_iconTop Results From Across the Web

Browserify - npm
Start using browserify in your project by running `npm i browserify`. ... Make file available from outside the bundle with require(file) .
Read more >
Browserify
Install. use Browserify from the Command Line. First install node, which ships with npm. Then do: npm install ...
Read more >
How To Use Node.js Modules in Browser By Using Browserify
And from that reason I've decided to create this video as an introduction to Browserify. So I hope you enjoy it and find...
Read more >
browserify: How to use npm modules in the browser - YouTube
This video shows you how to use browserify in order to use npm modules for client side web applications.
Read more >
Getting Started with Browserify - SitePoint
Browserify allows us to use node.js style modules in the browser. ... What we're doing here is using npm to install Browserify globally...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found