0.0.1 • Published 5 months ago
nb-tool-upload v0.0.1
nb-tool 小工具
版本
0.0.1
0.0.1
更新了默认的receiver
线下测试环境
在本地编译打包然后把产出推到线下机器的方式来测试
// 全局依赖,用来上传产出文件
npm i nb-tool -g
// 生成模版,app参数必填,上传目标机器的目录,一般是项目名称。生成模版后再根据实际需求修改
nb-tool template --app=nb-test
// 项目根目录下执行
sh nb-tool.sh
上传文件
npm run pre
nb-tool upload -c=./nb-tool.config.js -r=./build
nb-tool.config.js
csTool.match('*', {
deploy: {
type: 'http-push',
receiver: 'http://0.0.0.0:8999/receiver',
to: '/home/work/nb-tool-test'
}
})
csTool.match('.js$', {
deploy: {
type: 'http-push',
receiver: 'http://0.0.0.0:8999/receiver',
to: '/home/work/nb-tool-test'
}
})
生成配置文件
nb-tool template --app=my-app --receiver=http://0.0.0.0:8999/receiver --to=/home/work/my-app
nb-tool template -c=nb-tool.config.js --app=app-name --match=\* --to=/home/work/a --match=.js$ --to=/home/work/b
0.0.1
5 months ago