Hacker News new | ask | show | jobs
by pluma 4062 days ago
It's not a specific package manager. It's the package manager. You use Node.js (or io.js, which is effectively the same as Node.js) to build jQuery, the Node.js package manager is NPM. jQuery is an NPM package and uses NPM's package.json to define its development dependencies.

This isn't really up to debate. There are other package managers for JS, but they aren't replacements for NPM. And no, Meteor doesn't count -- Meteor is its own strange quasi-incompatible microcosm. In fact, some projects which aren't node packages use NPM just to manage development dependencies.

1 comments

I don't know how many other ways to say this: Downloading dependencies is not the job of a build system! One should be able to use npm to fetch dependencies, or get them via another means (your system package manager), and the build system shouldn't care. Coupling package managers to build systems is a mistake.
You can use any build system you want, but you need to have the build system's dependencies installed and those dependencies vary from project to project.

If you're using Makefiles, you implicitly depend on make. If you're using Grunt, you're likely implicitly depending on grunt-cli. NPM allows you to make these dependencies explicit (if the dependencies can be resolved to other NPM packages).

Heck, you can install node packages globally and be able to use them as if they were installed locally.

I don't know how many other ways to say this: what is your problem? As long as your package manager knows how to make the packages visible to node, you don't need NPM as a package manager. But you likely won't want to put all NPM packages in your package manager of choice's repository because there's a metric fuckton of them and system-level package managers have a habit of being horrendously out of date for application-level dependencies.

With regard to dependencies, every node project folder is like virtualenv. And as a matter of fact, every Python developer I know considers the system-level Python packages (i.e. those installed with apt-get or your PM of choice) a pain in the ass and only favours them if installing the package with pip would require a lot of native dev libraries (e.g. the MySQL driver or the XML/HTML packages).

The only thing making NPM a "build system" is its "npm run" command which lets you run the scripts defined in your package.json. And for many projects having a couple of aliases is all you really need and Grunt/Gulp/Make/Jake/Rake is overkill.

Either you have no idea what you are talking about or you're very bad at communicating what you take issue with.