1.0.0 • Published 4 years ago

webpack-autoupload-plugin v1.0.0

Weekly downloads
1
License
MIT
Repository
github
Last release
4 years ago

Note: Only work above node 8

Automatically upload packaged files Webpack Plugin

In many cases, we have to manually upload the corresponding file directory to the server after packaging the front-end code. When I was working, I felt that such operation was a waste of time. Wouldn't it be nice to have node-scp2 to automatically upload files to the corresponding file directory after webpack is packaged?

Note that in a Windows operating system server, you need to install open-ssh and configure it correctly to use the plug-in.

// method of application
const AutoUploadPlugin = require("webpack-autoupload-plugin")

plugins:[
    new AutoUploadPlugin({
        ip: '',
        user: '',
        password: '',
        src: '',
        dist: ''
    })
]

parameter specification:

argumenttypeexplain
ipStringYour server IP
userStringYour server login username
passwordStringYour server login password
srcStringThe folder path that needs to be uploaded
distStringFolder path in the server

Don't worry about the plug-in stealing your server account and password, the plug-in is open source.