webpack-ftp-upload
Version:
webpack plugin for ftp upload
50 lines (42 loc) • 878 B
Markdown
webpack plugin for ftp upload
```bash
npm i -D webpack-ftp-upload
```
or
```
yarn add --dev webpack-ftp-upload
```
add following code to your webpack config file.
```javascript
const WebpackFtpUpload = require('webpack-ftp-upload')
new WebpackFtpUpload('path'); // path.join(__dirname, '..')
```
```javascript
{
"host": "x.x.x.x",
"port": "22",
"username": "xx",
"password": "xxx",
"path": "remote path"
}
```
```javascript
const WebpackFtpUpload = require('webpack-ftp-upload')
module.exports = {
entry: 'ftp.js',
output: {
path: path.join(__dirname, 'dist'),
filename: 'ftp_bundle.js'
},
plugins: [
new WebpackFtpUpload('path')
]
}
```
MIT © [etwo](https://github.com/E-two)