0.0.1 • Published 2 years ago

@aacc/sh v0.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

@aacc/sh

Execa wrapper exposing a tagged templates API for executing shell commands

Installation

npm install @aacc/sh

Usage

Basic

import { sh } from '@aacc/sh'

const { stdout } = await sh`echo 'Hello world'`

console.log(stdout)

With options

import { sh } from '@aacc/sh'

await sh({ stdio: 'inherit' })`echo 'Hello world'`

See the execaCommand documentation for details on the available options

With shell syntax

import { sh } from '@aacc/sh'

await sh({ stdio: 'inherit', shell: true })`echo 'Hello world' | wc -w`

See the execaCommand documentation for details on the available options

Create sh API with pre-configured options

import { createSh } from '@aacc/sh'

const sh = createSh({ stdio: 'inherit', shell: true })

await sh`echo 'Hello world' | wc -w`

See the execaCommand documentation for details on the available options

0.0.1

2 years ago