Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ravindu01manoj/bash-js
Run Shell Commands in nodejs project
https://github.com/ravindu01manoj/bash-js
Last synced: 9 days ago
JSON representation
Run Shell Commands in nodejs project
- Host: GitHub
- URL: https://github.com/ravindu01manoj/bash-js
- Owner: ravindu01manoj
- Created: 2022-07-03T08:13:47.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2022-07-03T08:32:02.000Z (over 2 years ago)
- Last Synced: 2024-08-09T02:59:34.195Z (3 months ago)
- Language: JavaScript
- Size: 5.86 KB
- Stars: 2
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: Readme.md
Awesome Lists containing this project
README
# SHELL SCRIPT AND COMMANDS RUN WITH NODEJS
***
- [Ravindu Manoj](https://github.com/ravindu01manoj/)
***
## Installation
```sh
npm i @ravindu01manoj/bash-js
## or
yarn add @ravindu01manoj/bash-js
```***
## Example
```ts
const bash = require("@ravindu01manoj/bash-js")async function run() {
//for single command
const out = await bash.command("ls")
console.log(out)//for script
const script = `
mkdir a
cd a
touch hello.txt
ls
cd ..
`
const output = await bash.script(script)
console.log(output)
}
run()```
***