Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Add possibility to run binaries directly instead of having to alias everything #165

Open
Sjeiti opened this issue Mar 21, 2019 · 1 comment

Comments

@Sjeiti
Copy link

Sjeiti commented Mar 21, 2019

Not having prefix every command with npm run is very convenient but it does force you do alias every command for use in npm-run-all.

For example the following script:

"build": "del-cli dist & npm run bar & node task/foo & npx webpack --config webpack.config.js --env.development",
"bar": "node task/bar -qz"

would resolve to the following with npm-run-all:

"build": "npm-run-all clean bar foo webpack",
"clean": "del-cli dist"
"bar": "node task/bar -qz",
"foo": "node task/foo",
"webpack": "npx webpack --config webpack.config.js --env.development"

This is fine for longer tasks but feels very clumsy for short tasks.
A downside (especially for large projects) is a very large and unreadable npm scripts.

It would be great if a call like npm-run-all \"eslint src/**/*.js\" webpack would just work (where eslint is a binary and webpack a command defined in package json scripts).

@Sjeiti
Copy link
Author

Sjeiti commented Mar 26, 2019

Don't know if #10 is still on the roadmap but I see that Concurrently uses a prefix (npm:) for npm scripts. Then again, I can easily see this working without prefix by indexing npm script keys and an includes conditional.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant