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

create-gh-web

v0.1.7

Published

## 项目介绍 用于快速创建接入 SSO 的 Vue3 Web 项目,内置常用依赖与配置:Vue Router、Pinia、Element Plus、Axios、TailwindCSS、AG Grid 等。

Readme

create-gh-web

项目介绍

用于快速创建接入 SSO 的 Vue3 Web 项目,内置常用依赖与配置:Vue Router、Pinia、Element Plus、Axios、TailwindCSS、AG Grid 等。

快速开始

  • 公网(默认 registry):
    npx create-gh-web my-app
  • 指定公司私服 registry:
    npx --registry=<私服地址> create-gh-web my-app
  • 本地直接运行入口:
    node bin/create-gh-web.mjs <目标目录> --name <项目名> --pm <pnpm|npm|yarn> --install

CLI 参数

  • 位置参数 <目标目录>:生成到的目录;未提供时默认为当前目录
  • --name <项目名>:目标项目包名;未提供时交互式提示,默认用目标目录名
  • --pm <pnpm|npm|yarn>:选择包管理器;默认 pnpm
  • --install:生成后自动安装依赖
  • --registry <url>:安装依赖时使用的 npm registry(与登录/发布 registry 无关)

工作流程

  1. 解析参数,准备目标目录并推断项目名
  2. 从仓库根复制模板文件(白名单)到目标目录
  3. 初始化目标 package.json
    • 重写 nameprivate=trueversion=0.0.0
    • 删除不需要的 binfiles
  4. 按需安装依赖(支持 pnpm/npm/yarn--registry

复制规则与忽略项:

  • 顶层仅复制白名单:srcpublicindex.htmlpackage.jsonvite.config.jspostcss.config.jstailwind.config.jsREADME.md.env*
  • 遍历复制时自动忽略:node_modules.gitbin、构建产物目录、目标目录自身(避免递归复制)

发布到公司私服

  1. package.json 建议设置:
    • name: create-gh-web
    • version: 语义化版本(如 0.1.0)
    • private: false
    • bin: { "create-gh-web": "bin/create-gh-web.mjs" }
    • files: ["bin"](如引入 template 目录,再将其加入)
  2. .npmrc(项目或用户级)与登录:
    • registry=<私服地址>
    • npm login --registry=<私服地址>
  3. 发布命令:
    • pnpm publish --registry=<私服地址>
    • 若使用作用域包名(@your-scope/create-gh-web),请确保作用域指向私服 registry

常见问题

  • 403 或鉴权失败:检查 .npmrcregistry_authToken
  • 模板缺失:若后续引入 template 目录,记得将其加入 package.json files
  • 安装脚本受限:执行 pnpm approve-builds 允许相关脚本运行
  • 私服依赖缺失:安装时可临时切换到公网 npm registry