From bc5e7aa12add763e76689e9eac9f266c44f7c7c8 Mon Sep 17 00:00:00 2001 From: xiaoyann <0x0886@gmail.com> Date: Sun, 16 Jul 2017 09:01:10 +0800 Subject: [PATCH] upgrade --- README.md | 29 +++++++++++++++++++++-------- examples/basic/deploy.js | 2 +- plugins/webpack-plugin.js | 2 +- 3 files changed, 23 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 20f7ee5..b1492f5 100644 --- a/README.md +++ b/README.md @@ -37,7 +37,16 @@ client.sftp({ } ] }) -.upload() +.exec() +``` + +or use ftp + +```js +client.ftp({ + ... +}) +.exec() ``` #### options: @@ -66,13 +75,17 @@ rules | array of rule | rule use to speicify different place for each file. each ## Command Line Interface(CLI) ``` -./bin/deploy --server user:pwd@server_address:port --ignore **/*.map ./dist /data1/htdocs/testapp +$ ./bin/deploy-sftp --server user:pwd@server_address:port --ignore **/*.map ./dist /data1/htdocs/testapp +``` + +``` +$ ./bin/deploy-ftp ... ``` #### cli options: ``` - Usage: deploy [options] [workspace] [deployTo] + Usage: deploy-sftp [options] [workspace] [deployTo] Options: @@ -86,11 +99,11 @@ rules | array of rule | rule use to speicify different place for each file. each Examples: // use configuration from a file - $ deploy --config deploy.js + $ deploy-sftp --config deploy.js // deploy files in ./dist to /data1/htdocs/testapp on 10.13.1.2 - $ deploy -s user:pwd@10.13.1.2:22 --i *.map ./dist /data1/htdocs/testapp + $ deploy-sftp -s user:pwd@10.13.1.2:22 --i *.map ./dist /data1/htdocs/testapp - version: 2.1.2 + version: 3.1.0 ``` #### using config file @@ -110,13 +123,13 @@ module.exports = { Runing directly without any arg. ``` -./bin/deploy +./bin/deploy-sftp ``` If you prefer to place the configuration file in another place, you can use `-c, --config ` option like this: ``` -./bin/deploy --config ./config/your_conf.js +./bin/deploy-sftp --config ./config/your_conf.js ``` ## Used with plugins diff --git a/examples/basic/deploy.js b/examples/basic/deploy.js index 272d1ce..694b22f 100644 --- a/examples/basic/deploy.js +++ b/examples/basic/deploy.js @@ -16,6 +16,6 @@ client.sftp({ } ] }) -.upload() +.exec() diff --git a/plugins/webpack-plugin.js b/plugins/webpack-plugin.js index d8f45fb..4d7d38e 100644 --- a/plugins/webpack-plugin.js +++ b/plugins/webpack-plugin.js @@ -14,7 +14,7 @@ DeployPlugin.prototype.apply = function(compiler) { stats: {} } }) - self.client.upload(files) + self.client.exec(files) }) }