Home

Awesome

🎲 node-async-exec

version downloads license

A package that runs exec command asynchronously and also changes directory if needed to run commands.

Features

<br> <img src="./assets/suitcase.png" width="10%" />

Install

# install the package
npm install node-async-exec
<br> <img src="./assets/rocket.png" width="10%" />

Usage

const exec = require('node-async-exec');

(async () => {
	try {
		await exec({ cmd: `touch example.md` })
	} catch (err) {
		console.log(err);
	}
})()
const exec = require('node-async-exec');

(async () => {
	try {
		await exec({
			path: `/Users/saadirfan/GitHub`,
			cmd: `touch example.md`
		})
	} catch (err) {
		console.log(err);
	}
})()
const exec = require('node-async-exec');

(async () => {
	try {
		const commands = [`git init`, `touch example.md`];
		await exec({
			path: `/Users/saadirfan/GitHub`,
			cmd: commands
		})
	} catch (err) {
		console.log(err);
	}
})()

⚡️ Other Projects

I have curated a detailed list of all the open-source projects I have authored. Do take out a moment and take a look.

🔑 License & Conduct