When comparing NPM vs Ender, the Slant community recommends Ender for most people. In the question“What are the best front-end package managers?” Ender is ranked 4th while NPM is ranked 5th. The most important reason people chose Ender is:
Ranked in these QuestionsQuestion Ranking
Pro Compatible with any CLI
NPM is compatible with any CLI the developer wants to use.
Pro Plenty of helpful NPM modules/plugins
NPM has a strong community that has developed plenty of libraries and plugins that are useful to developers.
Pro Very concise configuration
NPM scripts require fewer lines of code to run a given task. This is true even when it's for running build processes. Using Unix pipes lots of tasks can be reduced to one-liners.
Pro Does not need any wrapper modules
With other task runners, you need to install wrapper modules for tools you may already have installed. When using NPM that's not necessary, to use the tools you need, just install them directly through NPM.
Pro Part of node.js distribution
Pro You're most likely using NPM already
Pro Uncomplicated package management system
When it works...
Pro Lets you bundle packages into a custom jQuery like object
Ender allows you to expose your packages into the $ namespace, which allows you to effectively create a customized jQuery. You can provide it with the selector engine, a DOM manipulation library, and an event library of your choice, as well as extend it with additional utilities. By using micro-libraries instead of jQuery, you can get smaller file sizes and more customized utility with more flexibility.
Pro Add dependencies and bundle into a package in one utility
As opposed to Browserify, Ender has the package management portion and bundler as one. Browserify is only a bundler, meaning you need to manage packages with npm as well. Using npm is good if you have frontend and backend dependencies, as you need to use npm for the backend anyway, but not as nice if you only need to create a package for the frontend.
Pro Uses the npm repository
Because Ender uses the npm repository, it gains access to its huge community and plenty of library support.
Pro Supports require through CommonJS
Ender is able to allow you to use use Node.js-style
requires, as it gets its packages from npm, which are all required to support CommonJS.
Pro Small lightweight modules
Ender encourages the use of smaller modules through a jQuery like object. Smaller projects benefit from being developed in parallel which can lead to faster release cycles for a single component, compared to a monolithic project like jQuery. You can also find more diverse functionality by using smaller projects.
By just using the components you need leads to a smaller file size and faster load speed. It also allows you to be more opinionated about which components you want to use, so you don't have to use an API you don't agree with just because it needs to provide backwards compatibility.
Con Custom tasks require additional keyword 'run'
Only a few standard tasks support being executed without the
run keyword (e.g.,
npm start vs
npm run customtask)
Con Not a build system, only a task runner
It is supposed to be used for running gulp, webpack or whatever. But it is not supposed to be used as a build system.
Con Passing parameters is awkward
In order to pass additional parameters to npm you must add them after
npm run build -- --custom='foo').
Con Badly documented
Less than bare minimum official documentation leaves users in the dark without taking often expensive external courses. Even the --help text has unpluggable gaps. One official source notes the documentation isn't adequate yet nothing has been done to fix this.
Con Lot of issues with authentication and random node problems
Unable to recover from common depencies conflicts consistantly. Error messages are not always helpful to debugging. Doesn't account well for users with different versions of node.
Con Does not run well with Windows
Since a lot of projects that use NPM as a build tool most of the time make use of Bash scripts as well. This means that open source projects that run the command
npm run may run into issues when used in a Windows environment.
Con Doesn't allow you to create build process with complicated logic on its own
In complex heterogeneous app you will quickly migrate to gulp, webpack or whatever leaving to NPM only simple task running responsibility.
Con Utilizing a registry not made for the browser
Ender is another attempt at hijacking and using npm for downloading browser dependencies. But in doing so, it's using a registry and module specifications not made for the browser. This means that there will have to be some extra work to get them to work properly.