ftp-lite

0.1.2 • Public • Published

node-ftp-lite

a wrapeer for the node-ftp-client and node-ftp

usage

create a new ftp.conf.json in your root dir, it should be like this:

{
    "host":"your ftp host",
    "user":"username",
    "port":21, //default port
    "source":"source", //support file or directories as 'abc.txt' or 'dir/**'.
    "remote":"Directory/", //remote path.
    "baseDir":"ftp-test"  //the base-dir of remote dir,if your remote directory have sub dir.
}
 

then add option in your package.json:

 
"scripts": {
    "push":" your compile task && ftplite " //upload files automatically after compiling.
  },
 
 

用法

在项目根目录创建ftp.conf.json:

{
    "host":"your ftp host",   //服务器地址
    "user":"username", //用户名
    "port":21, //默认端口
    "source":"source", //可以上传目录或文件
    "remote":"Directory/", // 服务器中的目录
    "baseDir":"ftp-test"  //如果上传到嵌套目录中,需要设置相应目录
}
 

package.json中脚本配置相应的动作

 
"scripts": {
    "push":" your compile task && ftplite " //主要用于前端项目打包后自动上传到ftp服务器
  },
 
 

Readme

Keywords

Package Sidebar

Install

npm i ftp-lite

Weekly Downloads

1

Version

0.1.2

License

none

Last publish

Collaborators

  • qix7