lyftp
ftp文件上传
使用
{
"host": "127.0.0.1",
"port": 34222,
"username": "dev",
"remotePath": "webApp/",
"privateKey": "/Users/xxx/.ssh/key",
"upload": {
"dev": ["dist/"],
"index": ["index.php"],
"router": ["router.php"]
}
}
在工程文件夹内添加一个.sftprc的json配置文件,配置如上,说明如下
key | 说明 |
---|---|
host | 服务器地址 |
port | 端口 |
user | 用户名 |
privateKey | ssh key |
remotePath | 服务器文件夹 |
upload | 上传文件配置,如上lysftp chat 会上传指定的两个文件/文件夹 |
上传
被上传的文件/文件夹路径,需要是相对.sftprc的相对路径或者是一个绝对路径
命令行上传
lysftp dev
命令行指定文件/文件夹
lysftp --files wptFtp/not/test/a.txt wptFtp/not/test2/