-
Notifications
You must be signed in to change notification settings - Fork 117
support npm? #193
Comments
Would be pretty amazing if this could work. You'd need to include all the built-in crap that Browserify adds, like shims for all the node globals and libraries. |
Yup, we could depend directly on the file from browserify with: var builtins = require('browserify/builtins.js'); Or even use browserify on the |
Or maybe just let |
@ianstormtaylor i think that's on the right track. I'm not really sure about the implementation details of this kind of task. We'd also have to resolve from the I probably won't be the one making this happen, at least not right now. But I'd support any initiative to get this up and running.
I wish it was this simple :-/. I think the package managers will conflict with each other though. Worth testing out! |
I'm just dipping my toes into the duo stream, but this project looks awesome! I work for npm now, so let me know if I can help somehow. |
+1 |
Just wanted to open this to jot down the way I think about this, and see if you guys even think it's possible or not, since I'm less familiar with the internals. I was thinking it would be really badass if when Duo was launched it support Component, Bower and Browserify packages out of the box (obviously not required, but it would still blow people's minds I think).
Right now we require dependencies as:
Which we can think of Go-style as shorthand for:
We can think about that "default" as being implicitly defined in the
component.json
, as something like:So if we wanted to grab a package straight from NPM instead, we would do:
And that would internally use a different install adapter to download the tarball. And when it downloaded the package, it would need a step to swap the
package.json
dependencies into acomponent.json
that also set theremote
tonpmjs.org
like so:So that when resolving child-dependencies we know which remote we should be looking to when no remote is specified outright. Then the
npm
install adapter could just have a simple catch for native modules that swaps in the standard browserify shims?I think with all of those pieces in place, all of the npm-logic is able to be quarantined into just living in the single install adapter? Does that make sense?
The text was updated successfully, but these errors were encountered: