1.3.1 • Published 4 years ago
webpack-ssh2-upload-plugin v1.3.1
webpack-ssh2-upload-plugin
Upload your files to ftp server easier and faster,add support to 'webpack --watch'
forked from faster-webpack-upload-plugin
Installation
npm i -D webpack-ssh2-upload-plugin
Usage
add following code to your webpack config file.
const FasterUploadPlugin = require('webpack-ssh2-upload-plugin');
var webpackConfig = {
entry: 'index.js',
output: {
path: 'assets',
filename: 'index_bundle.js'
},
plugins: [
new FasterUploadPlugin({
// config options, you can find options detail down here
})
]
}
Options Detail:
Option Name | Usage | Type | Default Value |
---|---|---|---|
host | Server's IP address | String | (none) |
port | Number of ssh port | String | "22" |
username | Username for authentication | String | (none) |
Deprecated,don't need it anymore | |||
remotePath | Folder path on server | String | (none) |
log | Show log when is uploading | Boolean | {info: Boolean, progress: Boolean, warning: Boolean, error: Boolean} | false |
clearFolder | Clear remote path files for the first time | Boolean | false |
fileIgnores | Files didn't upload(matching file path + file name) | Array\<RegExp> | (none) |
dirMode | Change the mode (read, write or execute permissions) of a remote file or directory | integer | (0o775) |
for other options you can see ssh2-sftp-client
Change Log
1.3.1
- fix: remote path dirMode bugfix
1.3.0
- change: remove fastPut Options, please use dirMode
1.2.6
- fix: dirMode Options bug;
1.2.4
- change: add dirMode Options mode for 0o775;
1.2.3
- change: initial fastPut Options mode for 0o775;
1.2.2
- change: add fastPut Options passed to createWriteStream (see below)
{
concurrency: 64, // integer. Number of concurrent reads
chunkSize: 32768, // integer. Size of each read in bytes
mode: 0o755, // mixed. Integer or string representing the file mode to set
step: function(total_transferred, chunk, total) // function. Called every time
// a part of a file was transferred
}
1.2.1
- change: change license from MIT to 996.ICU License
1.2.0
- change: remove the code of scanning local directory, so remove the option "localPath"
- fix: when webpack watching mode add new folder, the plugin can auto retry and make it right
License
This project is licensed under 996.ICU.