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

@tty-pt/scripts

v0.8.0

Published

Less (is more) than react-scripts

Readme

@tty-pt/scripts

esbuild-based build tool configured via package.json.

Installation

pnpm add -D @tty-pt/scripts

Usage

Add to your package.json:

{
  "scripts": {
    "build": "scripts build"
  }
}

Then run:

pnpm build

Output formats

The output formats produced are determined by which fields you define in package.json:

| Field | Format | |---|---| | main | CommonJS (.cjs) | | module | ESM (.mjs), one file per source file | | browser | IIFE (.js) |

Example:

{
  "main": "dist/index.cjs",
  "module": "dist/index.mjs",
  "browser": "dist/index.js",
  "entry": "./src/index.tsx"
}

package.json properties

entry

Entry point of your library or application. Can be a string or an object for multiple entry points.

{ "entry": "./src/index.tsx" }

library

Global name exported by the IIFE bundle. Set to a string (the global variable name) or true to derive it from the package name.

{ "library": "MyLib" }

template

Path to an HTML template file. Enables app build mode — esbuild will produce an index.html with scripts injected.

{ "template": "index.html" }

external

Dependencies to exclude from the bundle. Values follow webpack externals syntax — use a window. or global. prefix to map to a global variable, or a module prefix to treat as an ESM external.

{
  "external": {
    "react": "window.React",
    "react-dom": "window.ReactDOM"
  }
}

cdn

Controls how externals are resolved to URLs for injection into the HTML template. Keys are dependency names.

  • true — resolve automatically via https://unpkg.com/$NAME@$VERSION
  • A path string — appended to the CDN prefix (e.g. "umd/react.production.min.js")
  • A full URL — used as-is
  • cdn.default — override the default CDN prefix template, or set to false to use local node_modules
{
  "cdn": {
    "default": "https://cdn.skypack.dev/$NAME@$VERSION",
    "react": "umd/react.production.min.js"
  }
}

publicPath

Public path for assets in production builds. Defaults to /.

{ "publicPath": "/static/" }

development

Set to true to build in development mode (no minification, no source maps).

{ "development": true }

outputConfig

Set to true to write the resolved esbuild config to /tmp/scripts.config.json for debugging.

Advanced: overriding base-config.js

Place a base-config.js in your project root to extend or replace the default config resolution:

const makeConfigs = require("@tty-pt/scripts/base-config");

module.exports = function(env) {
  const configs = makeConfigs(env);
  // modify configs here
  return configs;
};