1.0.7 • Published 3 years ago
@handsomezyw/auto-deploy-webpack-plugin v1.0.7
auto-deploy-webpack-plugin
Upload your packaged folder to the specified path on the server(The file in the specified path will be cleared first)
Installation
Install with npm
npm install @handsomezyw/auto-deploy-webpack-pluginUsage
const AutoDeployWebpackPlugin = require("@handsomezyw/auto-deploy-webpack-plugin");
const options = {
serverOptions: {
username: "administrator",
host: "xxx.xx.x.xxx",
password: "123456"
},
localPath: "/Users/xx/Desktop/demo/dist",
serverPath: "Desktop/project/public"
};
// webpack.config.js
module.exports = {
plugins: [new AutoDeployWebpackPlugin(options)]
};options
serverOptions{ object }connect to the SSH configuration of the serverusername{ string }your server usernamepassword{ string }your server passwordhost{ string }your server ipprivateKey{ string }your privateKey
localPathlocal folder pathserverPathserver folder path