Skip to content

A high-level function for shelljs using promises.

Notifications You must be signed in to change notification settings

anno-ai/node-shelljs-promise

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

shelljs-promise

A high-level function for shelljs using promises. Optional support for escaping shell commands.

Unescaped shell command

const { shellExec } = require('@annoai/shelljs-promise')

shellExec('ls -al')
  .then((stdout) => {
    console.log(stdout)
  })
  .catch((stderr) => {
    console.log(stderr)
  })

Escaped shell command (supports array of strings only)

const { shellExec } = require('@annoai/shelljs-promise')

shellExec(['ls', '-al'])
  .then((stdout) => {
    console.log(stdout)
  })
  .catch((stderr) => {
    console.log(stderr)
  })

About

A high-level function for shelljs using promises.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published