1.0.9 • Published 2 months ago

webpack-ftp-uploader v1.0.9

Weekly downloads
-
License
ISC
Repository
-
Last release
2 months ago

上传文件到ftp的webpack插件

vue项目打包后把打包的文件自动上传到ftp服务器

安装

npm install webpack-ftp-uploader -D

package.json 中增加部署命令

"deploy": "vue-cli-service build"

使用

const webpackFtpUploader = require("webpack-ftp-uploader");
module.exports = {
  configureWebpack: (config) => {
    if (process.env.NODE_ENV === "production") {
      const argv = JSON.parse(process.env.npm_config_argv);
      const cammand = argv.original[1]
      cammand === 'deploy' && config.plugins.push(
        new webpackFtpUploader({
          host: "0.0.0.0",
          user: "user",
          password: "password",
          port: 21,
          localPath: 'dist/',
          remotePath: '/test2/'
        })
      );
    }
  }
}
1.0.9

2 months ago

1.0.8

2 months ago

1.0.7

1 year ago

1.0.6

1 year ago

1.0.5

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago