- Notifications
You must be signed in to change notification settings - Fork3
🎲 Run shell command with exec asynchronously
License
NotificationsYou must be signed in to change notification settings
msaaddev/node-async-exec
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
A package that runs exec command asynchronously and also changes directory if needed to run commands.
- Asynchronously run a shell command.
- Run a shell command/commands inside a specific directory.
- Usesexec node method andprocess.chdir under the hood.
- Can be used to build CLI and Node.js based tools.
# install the packagenpm install node-async-exec- Run a shell command
constexec=require('node-async-exec');(async()=>{try{awaitexec({cmd:`touch example.md`})}catch(err){console.log(err);}})()
- Change directory and run a command inside of it
constexec=require('node-async-exec');(async()=>{try{awaitexec({path:`/Users/saadirfan/GitHub`,cmd:`touch example.md`})}catch(err){console.log(err);}})()
- Change directory and run a number of shell command inside that directory
constexec=require('node-async-exec');(async()=>{try{constcommands=[`git init`,`touch example.md`];awaitexec({path:`/Users/saadirfan/GitHub`,cmd:commands})}catch(err){console.log(err);}})()
I have curated adetailed list of all the open-source projects I have authored. Do take out a moment and take a look.
About
🎲 Run shell command with exec asynchronously
Topics
Resources
License
Code of conduct
Contributing
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Uh oh!
There was an error while loading.Please reload this page.

