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

releaseasy-test

v0.3.4

Published

A modern starter template for building JavaScript libraries.

Readme

JavaScript Library Starter

Buy me a coffee Test codecov License: MIT

简体中文 | English

一个现代化的 JavaScript 库开发起始模板。

开箱即用地提供从开发、测试、构建到发布的完整工具链,让你专注于编写高质量的 JavaScript 库,而无需重复搭建基础工程配置。

集成

aaa

  • ⚡ Rolldown — 高性能 JavaScript 打包
  • 🔍 Oxlint — 极速代码检查
  • ✨ Oxfmt — 极速代码格式化
  • 🧪 Vitest — 单元测试与覆盖率
  • 📊 Codecov — 覆盖率报告上传与持续集成分析平台
  • 📦 Size Limit — 构建产物体积检测
  • 🪝 Simple Git Hooks — 轻量 Git Hooks
  • 🚀 Release Please — 自动化版本管理与发布
  • 📦 pnpm — 快速、节省磁盘空间的包管理器
  • 🤖 Renovate — 自动更新依赖版本
  • 📖 Publint — npm 包配置与发布产物检查

使用

使用 GitHub Template

推荐直接点击仓库右上角的 Use this template → Create a new repository,创建属于你的 JavaScript 库。

创建完成后克隆你的新仓库并安装依赖:

git clone https://github.com/YOUR_USERNAME/your-library.git

cd your-library

pnpm install

手动克隆

也可以直接克隆此模板:

git clone https://github.com/ajiho/javascript-library-starter.git your-library

cd your-library

pnpm install

然后修改 package.json、入口文件和源码,即可开始开发。

脚本

| 脚本 | 说明 | | --------------- | --------------------------------------------------------- | | pnpm fmt | 使用 Oxfmt 格式化代码 | | pnpm lint | 使用 Oxlint 检查代码 | | pnpm lint:fix | 自动修复代码问题 | | pnpm test | 使用 Vitest 运行测试并启动 UI | | pnpm coverage | 运行测试并生成覆盖率 | | pnpm build | 清理、构建并检查产物体积 | | pnpm size | 检查构建产物体积 | | pnpm clean | 清理 dist 目录 | | pnpm prepare | 初始化 Simple Git Hooks | | pnpm publint | 检查 npm 包配置和发布产物 | | pnpm check | 运行完整检查,包括代码检查、测试覆盖率、构建和 npm 包检查 |

构建流程

pnpm build 会依次执行:

clean → build:base → build:min → size

其中:

  • build:base — 使用 Rolldown 构建
  • build:min — 构建生产版本
  • size — 检查构建产物体积

鸣谢

该模板的灵感来自 typescript-library-starter。 a