Socket
Socket
Sign inDemoInstall

webpack-ssh-deploy-plugin

Package Overview
Dependencies
26
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

webpack-ssh-deploy-plugin

A webpack plugin for deploy assets to remote server over sftp


Version published
Maintainers
1
Weekly downloads
172
increased by8.86%

Weekly downloads

Readme

Source

WebpackSshDeployPlugin

A webpack plugin to deploy assets to remote server by scp.

Install

# yarn
yarn add webpack-ssh-deploy-plugin -D

Usage

Add this plugin instance to your webpack config as follow:

import * as fs from 'fs'
import * as os from 'os'
import * as path from 'path'
import { WebpackSshDeployPlugin } from 'webpack-ssh-deploy-plugin'
export = {
    plugins: [
        new WebpackSshDeployPlugin({
            root: '/home/work/www',
            host: 'sandbox.example.com',
            port: 22,
            username: 'work',
            privateKey: fs.readFileSync(path.join(os.homedir(), '.ssh/id_rsa')),
        })
    ]
}

Options Schema:

interface WebpackSshDeployPluginOptions {
    root: string;
    sock: stream.Duplex;
    proxy?: ssh2.ConnectConfig;
    cache: RegExp;
    host: string;
    port?: number;
    username: string;
    privateKey: string;
}

Note

Cache for immutable assets when develop

If you want to let some assets just deploy once, set the cache field of option, which is used for match the asset path, if matched, will send once.

Proxy use nc options

If you want to use proxy for access internal network by a jump machine, set proxy field as a ssh2.ConnectConfig.

Warning

This plugin is use for development, just send assets to remote server.

License

MIT

Keywords

FAQs

Last updated on 11 Sep 2017

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc