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

jzj-deploy

v1.0.0

Published

自动部署

Downloads

7

Readme

zuo-deploy

用 js 写一个 CI、CD 工具,实现细节文档: Vue + Node.js 从 0 到 1 实现自动化部署工具

version-v0.3.1 license-MIT

npm package

NPM

使用

# 全局安装
npm install jzj-deploy pm2 -g
# 开启服务
jzjdeploy start
# ✔ 请指定部署服务监听端口: … 7777
# ✔ 请设置登录密码(默认:888888) … ******

# 访问 127.0.0.1:7777 打开操作界面,密码 888888

docImages/deploy-add-sh.png

点击部署,会执行当前目录下的 deploy-master.sh,

需要自己在需要部署的项目里,创建一个 deploy-master.sh 脚本,并添加可执行权限(chmod +x 文件名),如果没有会直接报错,如上图。

# https://github.com/zuoxiaobai/zuo11.com 部署脚本示例
# deploy-master.sh
echo "开始部署..."

echo "git pull"
git pull

echo "zuoblog init"
zuoblog init --disable-dev-server

echo "部署完成!"

docImages/deploy-log.png

服务 log 查询

jzjdeploy start 会用 pm2 开启一个 jzjdeploy 服务,再次执行 jzjdeploy start 会删除原服务,再次开启新服务。如果开启失败,重新运行一次命令即可

# 查看 log
pm2 log
pm2 log jzjdeploy --lines 1000 # 指定行

其他

推荐部署脚本

echo "开始部署..."

# 防止部署 log 中文乱码
git config --global core.quotepath false

echo "git pull"
git pull

# 查看最近一次提交 log,了解当前部署的是哪个版本
echo "git log -1"
git log -1

# 构建相关
# 构建

echo "部署完成!"

eslint+prettier

# 初始化 package.json
npm init

# 添加 eslint、prettier
npm install [email protected] --save-dev
npx eslint --init # 初始化 .eslintrc.json 如果是 js,type 为 module 时改为 .cjs
# 支持 es modlues
# package.json 设置 type 为 module
npm install --save-dev --save-exact prettier
npm install eslint-config-prettier --save-dev # 处理与 eslint 的冲突
npm install eslint-plugin-prettier --save-dev # 将 prettier 以插件形式集成到 eslint 处理流程中
# prettier 如果配置没生效,重启 vscode 即可
# 配置参考 https://github.com/prettier/eslint-plugin-prettier

pm2 相关

防止 terminal node xx.js 进程被杀掉,使用 pm2 像守护进程一样后台执行

pm2 stop jzjdeploy
pm2 start src/index.js -n 'jzjdeploy'

跨文件传参, 文件读写

License

MIT