Merge pull request #5 from keqingrong/tweak-pkg Tweak README & package.json
Merge pull request #5 from keqingrong/tweak-pkg
Tweak README & package.json
Runs a command in a terminal (cmd.exe, gnome-terminal, Terminal) window.
$ npm i run-in-terminal
const { runInTerminal } = require('run-in-terminal'); runInTerminal('npm run watch'); runInTerminal('npm run watch').then(() => { // the terminal closed });
Returns a promise for the spawned child process.
Type: string
string
The command to run in a terminal window.
Type: Array
Array
List of string arguments.
Type: Object
Object
See child_process.spawn() options.
child_process.spawn()
Type: stringDefault: process.cwd()
process.cwd()
Current working directory of the child process.
MIT
版权所有:中国计算机学会技术支持:开源发展技术委员会 京ICP备13000930号-9 京公网安备 11010802032778号
run-in-terminal
Runs a command in a terminal (cmd.exe, gnome-terminal, Terminal) window.
Installation
Usage
API
runInTerminal(command[, args[, options]])
Returns a promise for the spawned child process.
command
Type:
stringThe command to run in a terminal window.
args
Type:
ArrayList of string arguments.
options
Type:
ObjectSee
child_process.spawn()options.cwd
Type:
stringDefault:
process.cwd()Current working directory of the child process.
License
MIT