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

zy-auto-deploy

v1.0.8

Published

前端静态文件自动部署

Readme

前端静态文件自动打包部署

安装依赖

// 局部安装
npm i zy-auto-deploy -D

// 全局安装
npm i zy-auto-deploy -g

添加配置文件deploy.config.js

配置文件放在项目根目录即可

module.exports = Object.freeze({
  SERVER_PATH: "", // 服务器ip地址
  SSH_USER: "root", // 服务器用户名
  SSH_KEY: "", // 服务器密码 
  PORT: 22, // 端口 默认为22
  DIST: "./build", // 需要部署的打包过后的文件夹 根据项目不同值不同 一般为 build static 或者dist
  SCRIPT: "npm run build", // 打包命令 可能项目由不同的构建命令 如打包指定环境的代码
  PATH: "/opt/book/admin", // 服务器存放静态文件目录
  COMMONDS: [`ls`, `rm index.html`, `rm -r css/`, `rm -r js/`], // 上传前执行的命令 本例是指 查看服务器对应/opt/book/admin下的文件 然后删除index.html,css,js这写文件和目录,  之后会执行上传本地文件到服务器操作
});

使用

如果是项目局部安装 package.json配置一下命令就可以

"scripts": {
  ...
  "dev": "",
  "build": "",
  "dpl": "zy-dpl",
  ...
},

npm run dpl

执行时会提示是否需要打包
当选择不需要时 会把本地已有的dist.zip上传 没有dist.zip时会重新执行打包命令


如果是全局安装 在deploy.config.js目录下执行zy-dpl即可

有问题可以到仓库提出来 我看到会解决一下

传送门zy-auto-deploy

注意

本工具上传时使用zip-local工具先压缩后上传 然后在服务器端执行unzip解压缩
所以服务器要安装unzip指令 可以求助后台开发 或者自行探索

打包后会在本地生成一个dist.zip压缩包 git忽略即可