question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Run any command without having to create a script for it

See original GitHub issue

I use npm-run-all to run multiple commands in parallel, but currently the commands can only be npm scripts. This is usually fine if you need these commands directly accessible (e.g. npm run test:style) but sometimes I just wish I could run simple commands directly:

run-p "test:*" "&tsc"
# where &tsc just runs the `tsc` command

Issue Analytics

  • State:open
  • Created 4 years ago
  • Reactions:15
  • Comments:5

github_iconTop GitHub Comments

1reaction
tkrotoffcommented, Jan 17, 2020

Would be nice to support this:

"clean": "rm -rf build coverage",
"clean:all": "npm run clean && rm -rf node_modules package-lock.json"
"lint": "tsc && eslint . '**/*.{js,jsx,ts,tsx}'"

Concurrently supports it:

"clean": "rm -rf build coverage",
"clean:all": "concurrently npm:clean 'rm -rf node_modules package-lock.json'"
"lint": "concurrently tsc \"eslint . '**/*.{js,jsx,ts,tsx}'\""
1reaction
fregantecommented, Oct 13, 2019

What if npm-run-all simply had a default $ script? I think that would be easy to implement and explain.

The point here would be to avoid adding further scripts to your own package-json

Read more comments on GitHub >

github_iconTop Results From Across the Web

Run a Shell Script Without Using “sh” or “bash” Commands
In this tutorial, we'll see what to do with scripts so that we can run them like any other programs, without using the...
Read more >
How do I run a shell script without using "sh" or "bash ...
Use chmod u+x scriptname to make the script executable (where scriptname is the name of your script). Place the script under /usr/local/bin ...
Read more >
Create screen and run command without attaching - Server Fault
As I am trying to automate the process of creating the screen and running the commands within it I would like to avoid...
Read more >
Execute a specific command in a given directory without cd'ing ...
It's rather trivial to make a script that does this: echo "#!/bin/bash; cd $1; exec $2" > /usr/local/bin/execindirectory; chmod +x /usr/local/bin/ ...
Read more >
Ask Question
Do not forget to relogin after creating the bin directory! ... You need to add the ./ to run commands from scripts in...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found