@zhijianren/node-cli
v0.0.23
Published
Description node脚本数据转excel数据
Readme
node-excel
介绍
node 命令行工具
安装
npm install @zhijianren/node-cli -g
使用
把数据导入 excel 文件
node-cli export [sourceFile...] -f filename -c config.json
filename导出生成的文件名sourceFile数据源文件,支持js和json文件,支持文件夹(不支持递归文件夹)config.json配置文件{ "input": { "headers": ["序号", "字段名", "中文", "英文"] }, "output": { "path": "./", "filename": "test" } }
把数据从 excel 中导出到 ts 或 js 文件
node-cli import [sourceFile] -t type -c config -o output
sourceFile数据源文件,excel 文件type导出文件类型,默认为 js 文件,支持 ts 类型output输出文件路径config导出数据配置文件
{
"object": {
"key": 1, // 对象 key 取值列
"value": 2 // 对象值取值列
},
"start": 1, // 数据开始行
"defaultValue": ""
}mac 上根据端口 kill 对应类型进程
node-cli port [port] -t type -p pid
port占用端口type协议类型,默认为 tcp 占用端口pid进程类型,默认为 node
用模板创建项目
node-cli project [pathname]
pathname项目相对当前命令运行的相对路径
