2.0.1 • Published 5 years ago

webpack-ftp-filesupload v2.0.1

Weekly downloads
56
License
ISC
Repository
-
Last release
5 years ago

webpack-ftp-filesupload

webpack plugin for upload variousType files to ftp server

Installation

npm i -D webpack-ftp-filesupload

or

yarn add --dev webpack-ftp-filesupload

Changes in 2.X

  • Change lifecycle hook from after-emit to emit

  • Compatibility with webapck4

Simple Usage

add following code to your webpack.prod.conf.js.

2.X version

const WebpackFtpFilesUpload = require('webpack-ftp-filesupload');
module.exports = {
  plugins : [
    // ...other plugin
    new WebpackFtpFilesUpload({
      ftpConfig: {
        user: 'ftp username',
        host: 'ftp host',
        password: 'ftp password'
      },
      uploadPath: {
        js : '//jsDir/' or '/jsDir/',
        css : '//cssDir/' or '/cssDir/',
        img : '//imgDir/' or '/imgDir/',
        font : '//fontDir/' or '/fontDir/'
      },
      autoAddPathPrefix: true // if true, the uploadPath will auto add file type directory. eg: js: '//jsDir/' -> then the real path is '//jsDir/js'
    })
  ]
};

1.X version

const WebpackFtpFilesUpload = require('webpack-ftp-filesupload');
module.exports = {
  plugins : [
    // ...other plugin
    new WebpackFtpFilesUpload({
      ftpConfig: {
        user: 'ftp username',
        host: 'ftp host',
        password: 'ftp password'
      },
      uploadPath: {
        js : '//jsDir/' or '/jsDir/',
        css : '//cssDir/' or '/cssDir/',
        img : '//imgDir/' or '/imgDir/',
        font : '//fontDir/' or '/fontDir/'
      },
      distPath: 'dist/**/*.*', // Generated file directory
      autoAddPathPrefix: true // if true, the uploadPath will auto add file type directory. eg: js: '//jsDir/' -> then the real path is '//jsDir/js'
    })
  ]
};
2.0.1

5 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago