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

ghini

v26.2.5224916

Published

2026 版现代 TS 脚手架:基于 Node 24 原生 ESM,利用“源码直连”实现免 build 实时调试;通过 esbuild 抹除后缀并配合 publishConfig,兼顾开发爽感与发布标准,是极致紧凑的 npm 库闭环模板。

Readme

一个标准 TypeScript 2026 的 npm 库脚手架

2026 版现代 TS 脚手架:基于 Node 24 原生 ESM,利用“源码直连”实现免 build 实时调试;通过 esbuild 抹除后缀并配合 publishConfig,兼顾开发爽感与发布标准,是极致紧凑的 npm 库闭环模板。

发布

pnpm build       # 编译 TypeScript + 打包 + 更新版本号
pnpm checkpub    # 检查发布内容
pnpm pub         # 构建 + 发布到 npm + 提交 git

🔧 如果需要 pnpm 迁移:

pnpm import
Remove-Item -Recurse -Force node_modules
Remove-Item package-lock.json
pnpm i

📦 创建新库

全文件替换 ghini 为新库名:

git clone -b ghini [email protected]:xghini/mynpm.git
mv mynpm ghini&&cd ghini
rm -rf .git
pnpm i
Remove-Item -Recurse -Force .git
git init
git add .
git commit -m "Initial commit"
git branch -M ghini
git remote add origin [email protected]:xghini/mynpm.git
git push -u origin ghini
pnpm pub

💡 核心设计说明 源码直连:package.json 中的 exports 在开发态指向 src/*.ts,配合 Node.js 24 --experimental-strip-types 实现保存即生效,告别 tsc --watch。

双模切换:利用 publishConfig 在发布时自动将入口切回 dist/*.js,确保用户侧的兼容性。

自动版本:build.js 内部集成日期版本算法(如 26.1.5161805),无需手动维护版本号。

esbuild 抹除:构建阶段自动处理 .ts 后缀映射,生成的单文件 ESM 产物极其紧凑。