Skip to content

pikaz-18/pikaz-shell

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Introduction

简单封装的执行命令的node脚本。

Installation

With npm or yarn

yarn add pikaz-shell

npm i -S pikaz-shell

For Typical use

以windows操作系统为例

const shell = require("./index")
shell([{ cmd: ["tree>tree1.txt","tree>tree2.txt"]},{ cmd: ["mkdir pikaz-shell"], path: "D:\\" }])

Methods:

方法名 说明 参数
shell 导出函数 function(attributes)

shell-Attributes:Object[]

参数 说明 类型 可选值 默认值
cmd 需执行的命令 String[] -- --
path 进程的当前工作目录 string -- null(执行node文件的当前目录)
timeout 超时时间 number -- 0

About

用于执行操作系统的命令行

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published