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

@weilinerl/deploy-helper

v1.0.8

Published

前端自动化压缩、上传、解压到目标服务器指定目录小工具

Readme

前端自动部署工具

为了解决前端开发中频繁需要将打包后的本地代码发布到个人服务器的相应目录下,以便部署webapp应用的苦恼,浓缩了这款小工具

使用方法

1. 下载相应的npm包到本地

npm install @weilinerl/deploy-helper -D

2. 在项目的根目录下新建/配置 .deploy.config.json 文件

{
  "host": "", // 域名或ip地址
  "port": 22, // 默认sftp连接端口号
  "localPath": "./dist", // 需要上传到服务器的本地文件夹目录
  "remotePath": "/root/dist", // 需要上传到目标服务器的文件夹目录,一般为tomcat的webapp目录
  "readyTimeout": 20000 // 默认连接超时时间
}

3. 在项目的package.json 的scripts中配置相应的启动命令

...
 scripts: {
   ...
   "deploy": "deploy-app"
 }
 ...

4. 开始发布

项目执行打包构建命令后会在根目录生成相应的文件夹,只需要在.deploy.config.json文件中配置好打包后的本地文件的文件夹相对目录localPath,然后执行以下命令即可

npm run deploy -- --username=${你的远程服务器的登录用户名} --password=${你的远程服务器的登录密码}

发布完成后会在服务器的remotePath文件夹中生成相应的文件(夹), 同时在本地配置的localPath文件夹中的生成相应的压缩文件(夹),文件名即为要上传的文件(夹)的文件(夹)名。

注意! 你的远程文件会被直接覆盖,将不会保留上一个版本,请做好备份谨慎使用!