2 ms·
So basically, what you're saying is that its hard to package Node apps using the typical systems package managers in situations where you want to build everythi
by spion 11y ago
So basically, what you're saying is that its hard to package Node apps using the typical systems package managers in situations where you want to build everything from source.
I can live with that. The worst fate would be having to modify what npm does (replacing the package fetch with building from source). Given that npm is licensed under the artistic license, thats not half as bad as it sounds.
I do agree that there is a lot of unnecessary complexity introduced by today's JS build tools such as grunt and gulp. But npm isn't to blame about that - its only sin is creating and nesting duplicate dependencies, something which is already fixed by npm 3 (completely flat node_modules unless there are unavoidable dependency conflicts). The solution here is to avoid bloated packages such as grunt and gulp that try to install everything plus the world. (coffee-script grunt? seriously?)
One thing npm could do is separate buildDependencies from devDependencies. There are a lot of tools listed there that only pertain to testing, and testing a serious client-side JS library such as jQuery properly is a hard and complex endeavour.
Also, I can't help but notice the irony of complaining about the complexity of web application build tools given the complexity hell that are autotools :)
- davexunit 11y agoLet's add another problem to the list: The packages uploaded to npmjs.org are typically not source packages, but "binaries" (in that they aren't source). They often contain minified JS files and no test suite, making them effectively useless for anyone that wants to build from source. Of all the language-specific package hosting sites, PyPI is the best I've encountered as they do proper source releases. Also, a package manager should not be a build tool. A build system should never require a particular package manager to be present. It's okay to say "you can optionally use this package manager to get all the dependencies needed to build", but it's not cool to say "you need this package manager in order to build."
- spion 11y agonpm does allow you to specify a repository url in package.json and warns when one isn't present. I guess we may've gotten a little too happy with the centralised proprietary cloudy source distribution channel with a single point of failure...