添加构建发布命令
更新说明文档
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -1,4 +1,5 @@
|
||||
dist/
|
||||
node_modules/
|
||||
yarn.lock
|
||||
package-lock.json
|
||||
*.xlsl
|
||||
15
README.md
15
README.md
@@ -24,13 +24,18 @@
|
||||
* 空(`null`)
|
||||
* 该工具设计原则是简单易用,表格字段可由策划自由调整,不支持数据引用,暂不支持结构体
|
||||
|
||||
## Windows 安装
|
||||
安装 NodeJS, 注意勾选将 Node 添加到环境变量 `PATH` 中
|
||||
## 安装
|
||||
- 安装 NodeJS 和 NPM, 注意将 Node 和 NPM 添加到环境变量 `PATH` 中
|
||||
- 执行下面的命令构建项目,将生成的 `dist` 复制到到您的项目中
|
||||
```
|
||||
npm run build
|
||||
```
|
||||
|
||||
## 使用
|
||||
修改配置表
|
||||
修改 excel-exporter.json 修改工具配置
|
||||
双击 转表.bat 执行转换工作
|
||||
- 按照上面介绍的规则填写 Excel 配置表
|
||||
- 修改 `excel-exporter.json` 修改工具配置,配置要读取的 Excel 文件列表,配置你需要的导出器
|
||||
- Windows 下双击 `转表.bat` 执行转换工作
|
||||
- Linux/macOS 下执行 `转表.sh` 执行转换工作
|
||||
|
||||
### 配置示例
|
||||
|
||||
|
||||
@@ -2,13 +2,15 @@
|
||||
"name": "tiny-nodejs-starter-kit",
|
||||
"version": "1.0.0",
|
||||
"main": "index.js",
|
||||
"license": "MIT",
|
||||
"license": "BSD",
|
||||
"scripts": {
|
||||
"dev": "node_modules/.bin/webpack --config webpack.config.js --watch",
|
||||
"compile": "node_modules/.bin/webpack --config webpack.config.js --env.production"
|
||||
"compile": "node_modules/.bin/webpack --config webpack.config.js --env.production",
|
||||
"build": "node ./tools/build.js"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "^14.0.1",
|
||||
"shelljs": "^0.8.4",
|
||||
"ts-loader": "^7.0.4",
|
||||
"tsconfig-paths-webpack-plugin": "^3.2.0",
|
||||
"typescript": "^3.9.2",
|
||||
|
||||
3
tools/build.js
Normal file
3
tools/build.js
Normal file
@@ -0,0 +1,3 @@
|
||||
const shell = require("shelljs");
|
||||
shell.exec("npm install && npm run compile")
|
||||
shell.cp(["转表.bat", "转表.sh", "excel-exporter.json"], "dist")
|
||||
2
转表.bat
2
转表.bat
@@ -1,2 +1,2 @@
|
||||
call node ./dist/binary.js ./excel-exporter.json
|
||||
call node ./binary.js ./excel-exporter.json
|
||||
pause
|
||||
Reference in New Issue
Block a user