sftp-upload-plugin
Advanced tools
Comparing version 1.0.2 to 1.0.3
@@ -9,4 +9,4 @@ const upload = require ('./server/upload'); | ||
apply(compiler) { | ||
compiler.plugin('done', () => { | ||
upload(this.config); | ||
compiler.plugin('done', (compilation, callback) => { | ||
upload(this.config, callback); | ||
}); | ||
@@ -13,0 +13,0 @@ |
{ | ||
"name": "sftp-upload-plugin", | ||
"version": "1.0.2", | ||
"version": "1.0.3", | ||
"description": "upload thought SFTP after build", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -84,3 +84,3 @@ const Client = require ('ssh2-sftp-client'); | ||
// 开始上传 | ||
function upload (config) { | ||
function upload (config, cb) { | ||
sftp | ||
@@ -90,2 +90,3 @@ .connect (config) | ||
sftp.dirPut(config.localPath, config.remotePath) | ||
.then(() => cb()) | ||
}) | ||
@@ -92,0 +93,0 @@ .catch (err => { |
Sorry, the diff of this file is not supported yet
15908
107