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 🙏

© 2026 – Pkg Stats / Ryan Hefner

webpack-auto-upload-j

v1.0.5

Published

webpack-auto-upload-j

Readme

webpack-auto-upload-j

最新版本改动 1.0.5 change 会在打包前记录文件,在成功打完包后,删除之前打包文件,上传最新打包文件

-------------------------------------------------------

最新版本改动 1.0.4 change 如果在package.json 有up,并且是一个Object, if (up.kaiguan === 0) { 文件打包完不会上传服务器 } else (up.kaiguan === 1) { 文件打包完会上传服务器,服务器地址是build_upload_test配置的serviceDir } else (up.kaiguan === 2) { 文件打包完会上传服务器,服务器地址是build_upload_pro配置的serviceDir }

-------------------------------------------------------

www.jiangji1.com中有思路拆分

一个自动上传文件的webpack插件

安装

npm install webpack-auto-upload-j

使用

在你的webpack.config.js中的plugins加入一项new WebpackAutoUploadJ(配置参数) 1

在写路径的时候如果是 左斜杠\,记得转义,换成\\,如果是右斜杠,就不用管

我是webpack的配置示列

const WebpackAutoUploadJ = require('webpack-auto-upload-j')
{
  plugins: [
    new WebpackAutouploadJ({
      path: 'E:\\xxx\\xxx\\xxx\\abc.json', // 这里是一个你本地json文件的绝对路径,是你自己的配置,示列在下面
      key: 'my-blog-web'
    }),
  ]
}

我是本地json文件的配置示列

{
  "my-blog-web": {
    "build_upload_test": {
      "host": "xxx.xxx.xxx.xxx",
      "port": 22,
      "user": "root",
      "password": "xxxxxxx",
      "entryDir": "dabao",
      "serviceDir": "/usr/xxx/xxx/dabao_test"
    },
    "build_upload_pro": {
      "host": "xxx.xxx.xxx.xxx",
      "port": 22,
      "user": "root",
      "password": "xxxxxxx",
      "entryDir": "dabao",
      "serviceDir": "/usr/xxx/xxx/dabao"
    }
  }
}

我是项目package.json文件的配置示列

{
  "up": {
		"build": "y dc",
		"build_upload_test": "y d",
		"build_upload_pro": "y d",
		"kaiguan": 2
	}
}

kaiguan

  • 如果是0,不会上传服务器,
  • 如果是1,上传的是上面本地json文件配置的build_upload_test中的serviceDir
  • 如果是2,上传的是上面本地json文件配置的build_upload_pro中的serviceDir

property

entryDir String or Array // relative path 相对路径 serviceDir String or Array serviceConfig Object * host your service IP * port your service Prot

如果entryDir 是 数组

  • serviceDir 必须也是 数组
  • entryDir的长度 不能 小于 serviceDir的长度

如果entryDir 是 字符串 并且 serviceDir 是 数组

  • entryDir 中的 文件 会传到 serviceDir 的 每个地址

上传服务器的结果,显示 2