1.0.1 • Published 3 years ago

webpack-easy-upload-plugin v1.0.1

Weekly downloads
6
License
MIT
Repository
github
Last release
3 years ago

Webpack-easy-upload-plugin

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

Installation

yarn add --dev webpack-easy-upload-plugin

Usage

add following code to your webpack config file.

var EasyUpload = require('webpack-easy-upload-plugin')

new EasyUpload({
    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/
    handleMode: false
})            

Simple example

var path = require('path')
var EasyUpload = require('webpack-easy-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/',
            handleMode: false
        })
    ]
}

License

This project is licensed under MIT.

1.0.1

3 years ago

1.0.0

5 years ago