Live data from Hacker News

Show HN: Duo – a next-generation package manager for the front end

duojs.org

21–30 of 103 posts

Re: Show HN: Duo – a next-generation package manager for the front end

#21

I love simple things, this gets my +1, look forward to learning more. I can't see why this is browser only, am I missing something?

I'd imagine doing this for node.js would require modifications to node itself since the behaviour of require would need to change. On second thought, I suppose you could just rename packages and mess with their path in node_modules to make things work. But that would mean moving out of the npm ecosystem which seems rather bold.

Re: Show HN: Duo – a next-generation package manager for the front end

#24

Earlier quoted context omitted.

Just to be clear, you can actually pin down the dependencies by creating a `component.json` manifest and adding the specific versions you want. You'd want to do this when publishing your own components, or when building a large app, but for quickly sketching out ideas you can just require them inline. Basically the manifest is optional, so you can choose when it makes sense to lock things down.

That's cool :) I assume the manifest can be auto-generated by examining the code? In that case, that makes me much more interested.

Not quite yet, but it totally could. We've been talking about trying to find a way to directly pin in the source with the help of a nice CLI instead. So that we can keep having no manifests, but get pinned deps at the same time without having to manually go through them all.

Re: Show HN: Duo – a next-generation package manager for the front end

#25
post #2

You can require dependencies and assets from the file system or straight from GitHub: Oh my. You've essentially killed Bower and NPM in one swoop then haven't you? An exciting time to be a web developer to say the least, this looks simply amazing.

well, except for the `npm install -g duo` bit :-)

Re: Show HN: Duo – a next-generation package manager for the front end

#26

Earlier quoted context omitted.

I used to think this too, but the more I use Go the more I enjoy not needing to maintain a silly manifest

Then when you need to pin down versions and such, it's a massive pain (in terms of not being able to have a manifest file in Go's native case).

I think the classic solution of vendoring your dependencies would be the best strategy here.

Re: Show HN: Duo – a next-generation package manager for the front end

#28
post #9

Reading the copy on the page, I wonder if the author has heard of npm init and npm install --save . I haven't had to edit package.json in quite a while.

Reading the copy on the page, I get the impression that the author dislikes the idea of a manifest (at all) rather than just the act of editing it.

Re: Show HN: Duo – a next-generation package manager for the front end

#29
Maybe it's just me but having no manifest makes using this tool quite painful. It has taken me 10 mins just to figure out how to structure the require()'s so that it doesn't error out, and that's with only requiring two packages.

For example I created a quick index.js file and required angular and restangular. It immediately errored out because the angular.js repo doesn't use semver on it's master branch. Ok fine, switch to angular/bower-angular, nope, it looks for index.js so my require now has to read: require('angular/bower-angular:angular.js'). Run again, error, same issue with restangular, it's looking for index.js. That require now reads: require('mgonto/restangular:dist/restangular.js'). I had to actually find where the files are that I wanted to require and explicitly state them in the require. Shouldn't this automatically parse bower/component/package.json files for this info, especially if you're touting the 'No Manifest' thing.

Re: Show HN: Duo – a next-generation package manager for the front end

#30
post #29

Maybe it's just me but having no manifest makes using this tool quite painful. It has taken me 10 mins just to figure out how to structure the require()'s so that it doesn't error out, and that's with only requiring two packages. For example I created a quick index.js file and required angular and restangular. It immediately errored out because the angular.js repo doesn't use semver on it's master branch. Ok fine, sw…

index.js as the entry point for a module is pretty standard with projects built around Component and npm. It's bower and the lack of the standard there that creates the issue.
Post reply on HN