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

tsup-npm-package-template

v1.0.0

Published

build npm package compatible with ESM and CJS

Readme

Modern TypeScript NPM Package Template

English | 中文

A template for developing modern npm packages using TypeScript, supporting both CommonJS (CJS) and ECMAScript Modules (ESM). This template uses tsup for efficient bundling.

Features

  • 🚀 TypeScript support
  • 📦 Dual CJS and ESM output
  • 🛠 tsup for fast and efficient bundling
  • 📊 Type declarations included
  • 🔄 Easy to use and customize

Getting Started

git clone https://github.com/nshen/tsup-npm-package-template 
cd tsup-npm-package-template 
# Modify as needed
npm run build
npm login
npm publish

Usage

After publishing the package, you can import it in your project:

// ESM
import { yourFunction } from 'your-package-name';

// CommonJS
const { yourFunction } = require('your-package-name');

Configuration

The project uses tsup for bundling. You can modify the tsup.config.ts file to adjust the build configuration.

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

This project is licensed under the MIT License


现代 TypeScript NPM 包模板

这是一个使用 TypeScript 开发现代化 npm 包的模板,同时支持 CommonJS (CJS) 和 ECMAScript 模块 (ESM)。本模板使用 tsup 进行高效打包。

特性

  • 🚀 支持 TypeScript
  • 📦 同时输出 CJS 和 ESM 格式
  • 🛠 使用 tsup 进行快速高效的打包
  • 📊 包含类型声明文件
  • 🔄 易于使用和自定义

快速开始

git clone https://github.com/nshen/tsup-npm-package-template 
cd tsup-npm-package-template 
# Modify as needed
npm run build
npm login
npm publish

使用方法

安装包后,您可以在项目中导入它:

// ESM
import { yourFunction } from 'your-package-name';

// CommonJS
const { yourFunction } = require('your-package-name');

配置

项目使用 tsup 进行打包。您可以修改 tsup.config.ts 文件来调整构建配置。

贡献

欢迎贡献!请随时提交 Pull Request。

许可证

本项目采用 MIT 许可证