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

guoxianxin-deploy

v0.0.7

Published

通过ssh连接服务器,将构建后的产物复制到服务器的对应目录下

Downloads

3

Readme

guoxianxin-deploy

一个简单的部署工具,通过 npm 命令将构建好的文件上传到指定服务器目录。支持自动生成配置文件,适用于快速部署前端构建产物到远程服务器。

✨ 特性

  • 自动读取并使用 2servefile.config.json 配置文件进行部署
  • 若配置文件不存在,将自动生成模板供用户填写
  • 支持用户名、密码、主机地址、本地构建目录和远程目录的自定义配置
  • 适合前端项目的构建产物部署(例如 dist/

📦 安装

npm install guoxianxin-deploy --save-dev
or
yarn add guoxianxin-deploy --dev

🚀 使用方法

在你的项目 package.json 添加:

  "scripts": {
    "deploy": "2servefile"
  },

运行

npm run deploy

首次运行时,如果当前目录下不存在 2servefile.config.json,会自动生成一个模板文件,你只需填写服务器连接信息并重新运行命令即可。

{
  "host": "远程服务器的 IP 地址",
  "username": "服务器的用户名",
  "password": "服务器的密码",
  "localDir": "构建产物的目录",
  "remoteDir": "远程服务器的目录",
  "privateKey": "私钥文件路径"
}

再次运行

npm run deploy

💡 建议

  • 建议将密码使用环境变量管理,避免上传敏感信息到代码仓库。
  • 可以将 2servefile.config.json 添加到 .gitignore 中。

📄 许可证

MIT License


作者:@GuoXianXin

欢迎提 Issue 或 PR 改进功能.