1.3.1 • Published 4 years ago

webpack-ssh2-upload-plugin v1.3.1

Weekly downloads
28
License
996.ICU
Repository
-
Last release
4 years ago

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 NameUsageTypeDefault Value
hostServer's IP addressString(none)
portNumber of ssh portString"22"
usernameUsername for authenticationString(none)
localPathFolder path which need uploadStringDeprecated,don't need it anymore
remotePathFolder path on serverString(none)
logShow log when is uploadingBoolean | {info: Boolean, progress: Boolean, warning: Boolean, error: Boolean}false
clearFolderClear remote path files for the first timeBooleanfalse
fileIgnoresFiles didn't upload(matching file path + file name)Array\<RegExp>(none)
dirModeChange the mode (read, write or execute permissions) of a remote file or directoryinteger(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.

1.2.6

4 years ago

1.2.5

4 years ago

1.2.4

4 years ago

1.3.1

4 years ago

1.3.0

4 years ago

1.2.3

4 years ago

1.2.2

4 years ago