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

create-chrome-ext-ts

v1.1.3

Published

A CLI tool to generate Chrome extension projects with TypeScript and Manifest V3

Readme

Chrome Extension TypeScript Template

A modern CLI tool to generate Chrome extension projects with TypeScript, using Manifest V3.

Quick Start

Generate a new Chrome extension project using npx:

npx create-chrome-ext-ts <project-name>

Example:

npx create-chrome-ext-ts my-awesome-extension

Check the version:

npx create-chrome-ext-ts -v
# or
npx create-chrome-ext-ts --version

This will:

  • Create a new directory with your project name in the current directory
  • Copy all template files
  • Update package.json and manifest.json with your project name
  • Install npm dependencies automatically

Features

  • ✅ TypeScript support
  • ✅ Webpack bundling
  • ✅ Manifest V3
  • ✅ Background service worker
  • ✅ Content script
  • ✅ Popup UI
  • ✅ Options page
  • ✅ Chrome Storage API integration
  • ✅ Message passing between components

Project Structure

.
├── src/
│   ├── background.ts      # Background service worker
│   ├── content.ts         # Content script (runs on web pages)
│   ├── popup.ts           # Popup script
│   ├── popup.html         # Popup HTML
│   ├── options.ts         # Options page script
│   └── options.html       # Options page HTML
├── icons/                 # Extension icons (create these)
├── manifest.json          # Extension manifest
├── webpack.config.js      # Webpack configuration
├── tsconfig.json          # TypeScript configuration
└── package.json           # Dependencies

Using as a Template Repository

If you've cloned this repository, you can also use the local generate script:

npm run generate <project-name>

Setup

  1. Install dependencies:

    npm install
  2. Build the extension:

    npm run build

    For development with watch mode:

    npm run dev
  3. Load the extension in Chrome:

    • Open Chrome and navigate to chrome://extensions/
    • Enable "Developer mode" (toggle in top right)
    • Click "Load unpacked"
    • Select the dist folder

Development

  • Build: npm run build - Creates production build in dist/
  • Dev: npm run dev - Watches for changes and rebuilds automatically
  • Clean: npm run clean - Removes the dist folder
  • Generate: npm run generate <name> - Creates a new project from this template

Customization

Adding New Scripts

  1. Add entry point in webpack.config.js:

    entry: {
      // ... existing entries
      newScript: "./src/newScript.ts";
    }
  2. Create the TypeScript file in src/

  3. Reference it in manifest.json if needed

Modifying Permissions

Edit the permissions array in manifest.json. Common permissions:

  • storage - For chrome.storage API
  • activeTab - Access to active tab
  • tabs - Full tabs API access
  • scripting - For injecting scripts
  • host_permissions - For specific domains

Manifest V3 Notes

  • Background scripts are now service workers (no DOM access)
  • Use chrome.storage instead of chrome.storage.local for sync
  • Content Security Policy is stricter
  • Message passing is async (use promises or callbacks)

Resources

Publishing

To publish this package to npm:

  1. Update the version in package.json
  2. Login to npm: npm login
  3. Publish: npm publish

After publishing, users can generate projects with:

npx create-chrome-ext-ts <project-name>

License

MIT