Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tgxhx/webpack-ftp-upload-plugin
A webpack ftp upload plugin.
https://github.com/tgxhx/webpack-ftp-upload-plugin
Last synced: 2 months ago
JSON representation
A webpack ftp upload plugin.
- Host: GitHub
- URL: https://github.com/tgxhx/webpack-ftp-upload-plugin
- Owner: tgxhx
- Created: 2017-12-29T09:30:10.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2017-12-31T15:44:05.000Z (about 7 years ago)
- Last Synced: 2024-09-19T16:48:09.994Z (4 months ago)
- Language: JavaScript
- Size: 3.91 KB
- Stars: 7
- Watchers: 2
- Forks: 4
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Webpack-ftp-upload-plugin
> A webpack ftp upload plugin, support upload file or folder to ftp server.
## Installation
```bash
npm i -D webpack-ftp-upload-plugin
```## Usage
add following code to your webpack config file.
```javascript
var WebpackFtpUpload = require('webpack-ftp-upload-plugin')new WebpackFtpUpload({
host: 'host',
port: 'post', // default: 22
username: 'user',
password: 'password',
local: 'local path', // eg. path.join(__dirname, 'dist')
path: 'remote path', // eg. /var/www/ftp/
})
```## Simple example
```javascript
var path = require('path')
var WebpackFtpUpload = require('webpack-ftp-upload-plugin')module.exports = {
entry: './index.js',
output: {
path: path.join(__dirname, 'dist'),
filename: 'index_bundle.js'
},
plugins: [
new WebpackFtpUpload({
host: '127.0.0.1',
port: '22',
username: 'root',
password: '123456',
local: path.join(__dirname, 'dist'),
path: '/var/www/ftp/',
})
]
}
```## License
This project is licensed under [MIT](http://www.opensource.org/licenses/mit-license.php).