0.0.90 • Published 5 years ago
depoly-ftp v0.0.90
简介
depoly-ftp 是一个基于 node.js 的方便、快捷的 FTP 工具.
要求
- node.js -- 版本高于v0.8.0
安装
npm i -D depoly-ftp
生成配置文件
node_module/depoly-ftp/bin/cli.js --init
例子
- easyftp.config.js
module.exports = {
entry: 'dist',
remoteEntry: '.',
host: localhost,
port: 21,
username: 'test',
password: 'test',
remote: [
{
pattern: '',
path: '',
}
]
}
配置
entry - string 目录 默认: 'dist'
host - string ftp主机名或IP 地址 默认: 'localhost'
port - number 端口号 默认: 21
username - string 用户名
password - string 密码
remote - array 从本地上传到远程主机
- remote.pattern - string 参考 https://www.npmjs.com/package/glob
- remote.path - string 远程主机路径
CLI API
- --init - 快速生成easyftp.config.js模板文件
- --deploy - 开始部署
- --config - 指定配置文件路径;