# webpack-ftp-plugin2

> webpack ft deploy plugin

Latest version **0.0.3** (published 2019-03-05) · ISC license · 0 weekly downloads

## Install

```sh
npm install webpack-ftp-plugin2
pnpm add webpack-ftp-plugin2
yarn add webpack-ftp-plugin2
bun add webpack-ftp-plugin2
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.3 |
| Published | 2019-03-05 |
| First published | 2018-09-14 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 5 |
| Unpacked size | 13.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | tankunpeng |
| Maintainers | tankunpeng |

## Links

- npm: https://www.npmjs.com/package/webpack-ftp-plugin2
- Repository: https://github.com/xiaotan0305/webpack-ftp-plugin2
- Homepage: https://github.com/xiaotan0305/webpack-ftp-plugin2#readme
- Issues: https://github.com/xiaotan0305/webpack-ftp-plugin2/issues
- npm.io page: https://npm.io/package/webpack-ftp-plugin2

## Dependencies (5)

- [async](https://npm.io/package/async.md) ^2.6.1
- [jsftp](https://npm.io/package/jsftp.md) ^2.1.3
- [colors](https://npm.io/package/colors.md) ^1.3.2
- [lodash](https://npm.io/package/lodash.md) ^4.17.11
- [iconv-lite](https://npm.io/package/iconv-lite.md) ^0.4.24

## Recent versions

- 0.0.3 (latest) — 2019-03-05
- 0.0.2 — 2018-09-14
- 0.0.1 — 2018-09-14

## README

# webpack-ftp-plugin2

## 说明

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

<p align="center"><img width="600px" src="http://owzieh3tb.bkt.clouddn.com/ftp-plugin.png" alt="实例"></p>

### Usage


Basic Usage
-----------
1. 安装

```
     $  npm i webpack-ftp-plugin2
```
或是
```
    $  yarn  add --dev  webpack-ftp-plugin2
```

1. add the plugin to your webpack config as follows:

```javascript
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':


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

### License

[MIT](http://opensource.org/licenses/MIT)

---
_Source: https://npm.io/package/webpack-ftp-plugin2 · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
