New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

folder-upload-webpack-plugin

Package Overview
Dependencies
Maintainers
1
Versions
45
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

folder-upload-webpack-plugin

Upload your folder to ssh sftp server after build, add support to 'webpack --watch'

  • 2.6.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
4
increased by100%
Maintainers
1
Weekly downloads
 
Created
Source

folder-upload-webpack-plugin

Upload your folder to ftp/sftp server easier and faster

NPM

Installation

npm i -D folder-upload-webpack-plugin

Usage

add following code to your webpack config file.

const FolderUploadWebpackPlugin = require('folder-upload-webpack-plugin');
let webpackConfig = {
  entry: 'index.js',
  output: {
    path: 'assets',
    filename: 'index_bundle.js'
  },
  plugins: [
    new FolderUploadWebpackPlugin({
      confirmation: true,
      server: {host: 'ip', port: '22', username: 'username', password: 'password'},
      paths: () => {
        let data = [];
        data[path.resolve(__dirname, "build_/")] = path.join(".../build/");
        return data;
      },
      clear: true,
      logging: false,
    })
  ]
}

Options Detail:

Option NameUsageTypeDefault Value
confirmationshow confirmation before uploadBooleanfalse
serverssh config for options(or Array, to multiple servers) you can see docsObject{port:22}
pathsfunction - return object {local: remote}, see path exampleFunction(none)
clearoptional clear server folder before uploadBooleantrue
loggingoptional show logBooleanfalse
symlinkcreate local symlink, after uploadobjectnull

Extend Options Detail:

Option NameUsageTypeDefault Value
sshoptional ssh classClasssee code
chmodoptional compress levelOctal0o644
beforeoptional array with commandArray[]
afteroptional array with commandArray[]

for other options you can see https://github.com/mscdex/ssh2#client-methods

path example

... 
paths: () => {
    let data = [];
    data[path.resolve(__dirname, "build_/")] = path.join("...build/");
    return data;
},...

Change Log

2.4.0

- fix ts

2.1.0

- add after and before command

2.0.0

- replace paths. see Options
- remove pathsClear && remotePath

1.1.0

- change upload type

1.0.0

- init

Keywords

FAQs

Package last updated on 23 Apr 2021

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc