npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

webpack-publish-plugin

v1.3.5

Published

Webpack environment code deployment upload support, support FTP and SFTP

Downloads

28

Readme

webpack-publish-plugin

This plugin is a wrapper for basic-ftp and ssh2-sftp-client. You can upload directory to your ftp/sftp server after webpack build done.

Installation

npm i -D webpack-publish-plugin

Usage

  • add following code to your webpack config file.
const WebpackPublishPlugin = require('webpack-publish-plugin');

var webpackConfig = {
  entry: 'index.js',
  output: {
    path: 'assets',
    filename: 'index_bundle.js'
  },
  plugins: [
    new WebpackPublishPlugin({
        // config options, you can find options detail down here
        host: 'YOUR_HOST',
        port: 'YOUR_PORT',
        username: 'YOUR_USER_NAME',
        password: 'YOUR_PASSWORD',
        remotePath: 'YOUR_REMOTE_PATH'
    })
  ]
}
  • How can I connect through a Socks Proxy
const WebpackPublishPlugin = require('webpack-publish-plugin');

var webpackConfig = {
  entry: 'index.js',
  output: {
    path: 'assets',
    filename: 'index_bundle.js'
  },
  plugins: [
    new WebpackPublishPlugin({
      // config options, you can find options detail down here
        host: 'YOUR_TARGET_HOST',  // target host
        port: 'YOUR_TARGET_PORT',  // target host port
        username: 'YOUR_TARGET_USER_NAME', // target host username
        password: 'YOUR_TARGET_PASSWORD',  // target host password
        remotePath: 'YOUR_REMOTE_PATH',
        proxy: {
          // proxy host options
          host: 'YOUR_PROXY_HOST',  // proxy host
          port: 'YOUR_PROXY_PORT',  // proxy host port
          username: 'YOUR_PROXY_USER_NAME', // proxy host username
          password: 'YOUR_PROXY_PASSWORD',  // proxy host password
        }
    })
  ]
}

Options Detail:

支持分布式项目代码部署,参数改成传入数组即可: [{Options}, {Options}]
- PS:将代码部署到N台分布式的服务器上。

Option Name|Usage|Type|Request|Default Value ---|:--:|:--:|:--:|:-: type|Server's connect type|String|No|(sftp/ftp) host|Server's IP address|String|Yes|(None) port|Number of ssh port|Number|No|22 username|Username for authentication|String|Yes|(None) password|Password for authentication|String|Yes|(None) proxy|Connect to SOCKS 4/5 Proxy|Object|No|(None) ~~localPath~~|~~Folder path which need upload~~|~~String~~|No|Deprecated,don't need it anymore remotePath|Folder path on server|String|Yes|(None) log|Show log when is uploading|Boolean | {info: Boolean, progress: Boolean, warning: Boolean, error: Boolean}|No|false clearFolder|Clear remote path files for the first time|Boolean|No|false fileIgnores|Files didn't upload(matching file path + file name), only sftp|Array<RegExp>|No|(None) dirMode|Change the mode (read, write or execute permissions) of a remote file or directory, only sftp|Integer|No|(0o775)

For other options you can see:

Changelog

1.3.5

- fix: 修复chalk版本被升级至v5后导致出现依赖报错

1.3.2

- perf: 优化ftp上传方式的UE和进度展示
- fix: 修复上传异常报错后被挂起的问题
- docs: 补全代理跳板的参数和参考示例

1.3.0

- feat: 增加支持开启代理跳板
- fix:修复ftp无法部署的问题

1.2.0

- feat: 增加支持webpack5(3 | 4| 5)
- feat:支持分布式代码部署

1.1.0

- feat: 基于 ssh2-sftp-client 组件重构sftp上传方式的功能逻辑(从此版本后不再依赖 webpack-ssh2-upload-plugin)

1.0.1

- fix: Revision version number
- fix: fix dependencies

1.0.0

- Initialize Project

License

This project is licensed under 996.ICU.