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
Con Doesn't allow 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 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 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.