New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

webpack-ftp-plugin2

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

webpack-ftp-plugin2

webpack ft deploy plugin

latest
Source
npmnpm
Version
0.0.3
Version published
Weekly downloads
2
100%
Maintainers
1
Weekly downloads
 
Created
Source

webpack-ftp-plugin2

说明

该插件基于原创修改以满足开发需求,https://github.com/CharlieLau/webpack-ftp-plugin

实例

Usage

Basic Usage

  • 安装
     $  npm i webpack-ftp-plugin2

或是

    $  yarn  add --dev  webpack-ftp-plugin2
  • add the plugin to your webpack config as follows:
var WebpackFtpPlugin = require('webpack-ftp-plugin2')
var webpackConfig = {
  entry: 'index.js',
  output: {
    path: 'dist',
    filename: 'index_bundle.js'
  },
  plugins: [new WebpackFtpPlugin({
      ftp: {
        "authKey": {
            "username": "xx", // 用户名
            "password": "xxx" // 密码
        },
        "host": "x.x.x.x", // ip
        "port": "21" // 端口
    },
    remoteRoot: '/', // 远程ftp路径
    localRoot: __dirname, // 本地路径根目录
    deployPath: './build' // 基于本地路径根目录的相对路径
})]
}

注意事项

env支持,production生产环境才能deploy

process.env.NODE_ENV === 'production':

new webpack.DefinePlugin({
    'process.env.NODE_ENV': JSON.stringify('production')
})

License

MIT

FAQs

Package last updated on 05 Mar 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts