github地址:
https://github.com/shangyueyue/ssy-publish
一、安装
npm install ssy-publish -D
二、在process.cwd() 目录下创建 sftprc.json文件
{ "localPath": "./dist", "remotePath": "/app/xxx", "protectedRemotePath": "/app/xxx", "connect": { "host": "xx.xx.xx.xx", "port": 22, "username": "xxx", "password": "xxx" } }
三、npm run ssy-publish
"scripts": { "ssy-publish": "ssy-publish -c dist" },