webpack-sftp-upload-plugin

1.0.3 • Public • Published

Webpack-ftp-upload-plugin

A webpack ftp upload plugin, support upload file or folder to ftp server.

It's a fork from @tgxhx's webpack-ftp-upload-plugin. This forks creates the folder in the remote SFTP before uploading files.

Installation

npm i -D webpack-ftp-upload-plugin

Usage

add following code to your webpack config file.

var WebpackFtpUpload = require('webpack-ftp-upload-plugin')
 
new WebpackFtpUpload({
    host: 'host',
    port: 'post', // default: 22
    username: 'user',
    password: 'password',
    local: 'local path', // eg. path.join(__dirname, 'dist')
    path: 'remote path', // eg. /var/www/ftp/
})            

Simple example

var path = require('path')
var WebpackFtpUpload = require('webpack-ftp-upload-plugin')
 
module.exports = {
    entry: './index.js',
    output: {
        path: path.join(__dirname, 'dist'),
        filename: 'index_bundle.js'
    },
    plugins: [
        new WebpackFtpUpload({
            host: '127.0.0.1',
            port: '22',
            username: 'root',
            password: '123456',
            local: path.join(__dirname, 'dist'),
            path: '/var/www/ftp/',
        })
    ]
}

License

This project is licensed under MIT.

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
1.0.31latest

Version History

VersionDownloads (Last 7 Days)Published
1.0.31
1.0.20
1.0.10
1.0.00

Package Sidebar

Install

npm i webpack-sftp-upload-plugin

Weekly Downloads

1

Version

1.0.3

License

MIT

Unpacked Size

5.78 kB

Total Files

5

Last publish

Collaborators

  • ferpinan