Skip to content

LinuxSuRen/run-in-terminal

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

run-in-terminal

npm package NPM downloads

Runs a command in a terminal (cmd.exe, gnome-terminal, Terminal) window.

Installation

$ npm i run-in-terminal

Usage

const { runInTerminal } = require('run-in-terminal');

runInTerminal('npm run watch');

runInTerminal('npm run watch').then(() => {
  // the terminal closed 
});

API

runInTerminal(command[, args[, options]])

Returns a promise for the spawned child process.

command

Type: string

The command to run in a terminal window.

args

Type: Array

List of string arguments.

options

Type: Object

See child_process.spawn() options.

cwd

Type: string
Default: process.cwd()

Current working directory of the child process.

License

MIT

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 88.4%
  • AppleScript 11.6%