mysticatea / npm-run-all

A CLI tool to run multiple npm-scripts in parallel or sequential.
MIT License
5.72k stars 240 forks source link

Not working with all built-in tasks #203

Open raszi opened 3 years ago

raszi commented 3 years ago

It works with a regular npm command:

$ npm pack
> @group/package@0.0.1 prepack
> tsc
npm notice
npm notice 📦  @group/package@0.0.1
...
npm notice
group-package-0.0.1.tgz

Does not work with npm-run-all:

$ npx npm-run-all pack
ERROR: Task not found: "pack"
dfernandez79 commented 3 years ago

Note that pack is not a script, npm-run-all pack is the equivalent of npm run pack not npm pack

maximedupre commented 3 years ago

Is there a way to run npm pack inside an npm-run-all script, or can npm-run-all only run other npm scripts?

maximedupre commented 3 years ago

I guess the answer is in the README - it can only run other npm scripts.

A CLI tool to run multiple npm-scripts in parallel or sequential.

raszi commented 3 years ago

This limitation, unfortunately, prevents the wider usage of this tool.

wll8 commented 3 years ago

This tool should not be restricted to only npm commands.

Maxim-Mazurok commented 3 years ago

Is there a way to run npm pack inside an npm-run-all script, or can npm-run-all only run other npm scripts?

I guess you can try adding this:

{
  "scripts": {
    "pack": "npm pack"
  }
}

and then use npx npm-run-all pack

wll8 commented 3 years ago
qs demo gif
For demo video, please click

Finally, I use this tool, which can execute arbitrary commands in parallel or serially, and of course it also includes npm.

E.g:

npm i -g qs-cli

# Save the command, then execute the command in parallel
qs -n xx -p "ping github.com" "ping httpbin.org"

# Re-execute the command at any location
qs -s xx