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 🙏

© 2025 – Pkg Stats / Ryan Hefner

sunrise-deploy

v1.0.5

Published

自动化部署工具,支持多项目配置管理和一键部署

Readme

Sunrise Deploy

自动化部署工具,支持多项目配置管理和一键部署。

特性

  • 🚀 一键部署项目到远程服务器
  • ⚙️ 管理多个项目配置
  • 📦 自动构建和压缩项目
  • 🔄 支持远程备份和解压
  • 🌳 支持路由部署模式
  • 💾 配置文件持久化存储

安装

npm install -g sunrise-deploy

使用方法

基本使用

安装完成后,在命令行中运行:

sunrise-deploy

指定配置文件

sunrise-deploy -c /path/to/deploy.config.json

配置文件

配置文件默认位于 ~/deploy/deploy.config.json,包含以下结构:

{
  "default": {
    "zip": "dist.zip",
    "buildCommand": "npm run build",
    "steps": {
      "backup": {
        "enabled": true,
        "command": "cd $REMOTE && cp -r dist dist.backup",
        "description": "远程备份旧版本"
      },
      "build": {
        "enabled": true,
        "description": "本地构建项目"
      },
      "zip": {
        "enabled": true,
        "description": "压缩项目文件"
      },
      "upload": {
        "enabled": true,
        "description": "上传文件到服务器"
      }
    }
  },
  "projects": {
    "my-project": {
      "server": "[email protected]",
      "remote": "/var/www/my-project",
      "local": "/path/to/local/project",
      "steps": {
        "extract": {
          "enabled": true,
          "command": "cd $REMOTE/dist && unzip $ZIP && rm $ZIP",
          "description": "远程解压文件"
        }
      }
    }
  }
}

配置说明

  • default: 默认配置,所有项目共享
    • zip: 压缩文件名
    • buildCommand: 本地构建命令
    • steps: 部署步骤配置
  • projects: 各项目特定配置
    • server: 服务器地址
    • remote: 远程路径
    • local: 本地路径
    • steps.extract: 解压步骤配置

变量替换

在命令中可以使用以下变量:

  • $SERVER: 服务器地址
  • $REMOTE: 远程路径
  • $ZIP: 压缩文件名

功能说明

交互式界面

工具提供了友好的交互式界面,支持以下操作:

  1. 🚀 开始部署:选择项目并执行部署流程
  2. ⚙️ 配置管理:添加、查看、删除项目配置
  3. ❌ 退出程序

配置管理

配置管理功能支持:

  • 📋 查看当前配置:显示所有项目配置
  • 📝 新增项目配置:添加新项目配置
  • 📝 删除项目配置:删除已有项目配置

部署流程

部署流程包含以下步骤:

  1. 远程备份(可选)
  2. 本地构建
  3. 文件压缩
  4. 文件上传
  5. 远程解压和清理

开发

构建项目

npm run build

开发模式

npm run dev

类型检查

npm run tsc

许可证

MIT