node-scp enhancement
shell
npm i @xinliang/scp -D
`
1. init
scp.config.json file
> The clientConfig configuration should be consistent with node-scp. If you expect more freedom of control, you should use node-scp directly
`json
{
"clientConfig": {
"host": "www.google.com",
"port": 22,
"username": "root"
},
"uploadPath": "./dist",
"remotePath": "project/workspace"
}
`
2. add
scripts for package.json
`diff
...
"scripts": {
+ "push": "scp",
},
...
``