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-minimal-pwa

v1.0.4

Published

CLI tool to generate minimal PWA requirements

Readme

Create Minimal PWA

GitHub npm npm

A simple CLI tool to generate the minimal required files for a Progressive Web App (PWA).

Features

  • Generates all the required files for a minimal PWA:
    • manifest.json - Web app manifest with basic configuration
    • index.html - Simple HTML file with service worker registration
    • sw.js - Service worker for offline functionality
    • icon.png - Basic square icon with your chosen colour
  • Customizable project name, icon colour, and platform support
  • Interactive CLI interface
  • Zero configuration - just run and answer prompts

Installation & Usage

Running the tool

To run the tool, use npx:

npx create-minimal-pwa

Installation

To install the tool globally:

npm install -g create-minimal-pwa

Then run the tool:

create-minimal-pwa

## How It Works

When you run the tool, you'll be prompted for:

1. **Project name** - The name of your PWA
2. **Icon color** - Color for the generated icon (hex code or color name)
3. **Platform support** - Which platforms the icon should support (iOS, Android, Desktop)

The tool will then generate a directory with your project name containing all required PWA files.

## Generated Files

### manifest.json

Contains the basic metadata for your PWA:

```json
{
  "name": "Your PWA Name",
  "short_name": "PWA Name",
  "start_url": "/",
  "display": "standalone",
  "background_color": "#ffffff",
  "theme_color": "#000000",
  "icons": [
    {
      "src": "./icon.png",
      "sizes": "192x192",
      "type": "image/png"
    },
    {
      "src": "./icon.png",
      "sizes": "512x512",
      "type": "image/png"
    }
  ]
}

index.html

A simple HTML file with:

  • Proper meta tags
  • Manifest link
  • Service worker registration
  • Platform-specific meta tags (based on your selections)

sw.js

A basic service worker that:

  • Caches core application files
  • Serves files from cache when offline
  • Manages cache updates

icon.png

A simple square icon in your chosen colour.

Testing Your PWA

After generating the files:

cd your-project-name
npx serve

Then open your browser to the displayed URL (usually http://localhost:3000).

To verify PWA functionality:

  1. Open Chrome DevTools
  2. Go to the "Application" tab
  3. Check the "Manifest" and "Service Workers" sections

Requirements

  • Node.js >= 18
  • For the canvas dependency (used to generate the icon), you might need additional system libraries:
    • Ubuntu/Debian: sudo apt-get install build-essential libcairo2-dev libpango1.0-dev libjpeg-dev libgif-dev librsvg2-dev
    • macOS: brew install pkg-config cairo pango libpng jpeg giflib librsvg
    • Windows: See the node-canvas wiki

Development

Project Structure

create-minimal-pwa/
├── bin/
│   └── index.js            # Main executable entry point
├── src/
│   ├── cli.js              # Command-line interface and user input handling
│   ├── generators/
│   │   ├── iconGenerator.js        # Icon generation logic
│   │   ├── manifestGenerator.js    # Manifest.json generation
│   │   ├── htmlGenerator.js        # Index.html generation 
│   │   └── serviceWorkerGenerator.js # Service worker generation
│   └── utils/
│       ├── fileSystem.js           # File system operations
│       └── platformHelpers.js      # Platform-specific helpers
├── package.json
└── README.md

Acknowledgments