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/xstart

v26.1.8154933

Published

基于 Node 24 原生 ESM,利用"源码直连"实现免 build 实时调试;通过 esbuild 抹除后缀并配合 publishConfig,兼顾开发爽感与发布标准。

Downloads

389

Readme

TypeScript 2026 npm 库脚手架

基于 Node 24 原生 ESM,利用"源码直连"实现免 build 实时调试;通过 esbuild 抹除后缀并配合 publishConfig,兼顾开发爽感与发布标准。

📦 创建新库

PowerShell (Windows)

$lib = "xstart"
git clone -b xstart [email protected]:xghini/mynpm.git $lib && cd $lib
(Get-Content package.json) -replace 'xstart', $lib | Set-Content package.json
(Get-Content app/0.ts) -replace 'xstart', $lib | Set-Content app/0.ts
Remove-Item -Recurse -Force .git
git init && git add . && git commit -m "init $lib"
git branch -M $lib && git remote add origin [email protected]:xghini/mynpm.git
git push -u origin $lib -f && pnpm i && pnpm pub

Bash (Linux/macOS)

lib="xstart"
git clone -b xstart [email protected]:xghini/mynpm.git $lib && cd $lib
perl -i -pe "s/xstart/$lib/g" package.json app/0.ts
rm -rf .git
git init && git add . && git commit -m "init $lib"
git branch -M $lib && git remote add origin [email protected]:xghini/mynpm.git
git push -u origin $lib -f && pnpm i && pnpm pub

🚀 开发命令

pnpm test          # 运行测试
pnpm test:watch    # 监听模式
pnpm test:coverage # 覆盖率报告
pnpm typecheck     # 类型检查
pnpm build         # 编译 + 打包 + 更新版本号
pnpm pub           # 构建 + 发布 + 提交

💡 核心设计

  • 源码直连:开发态 exports 指向 src/*.ts,Node 24 原生支持直接运行 TypeScript
  • 双模切换:publishConfig 发布时自动切回 dist/*.js,确保兼容性
  • 自动版本:build.js 内置日期版本算法(如 26.1.5161805)
  • 路径处理:xpath 默认相对于入口脚本目录,支持 pm2 等场景通过 KIT_EXEPATH 环境变量覆盖

🔧 pnpm 迁移

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