pikaz-shell

javascript for manipulating the shell

Usage no npm install needed!

<script type="module">
  import pikazShell from 'https://cdn.skypack.dev/pikaz-shell';
</script>

README

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:\\" }])

Demo代码

Methods:

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

shell-Attributes:Object[]

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