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

@vrdons/module-template

v0.0.4

Published

Module template

Readme

Module Template

A modern TypeScript module template with comprehensive tooling for development, building, and publishing.

Features

  • 🚀 TypeScript - Full TypeScript support with modern ES2024 target
  • 📦 Dual Package - Supports both CommonJS and ESM formats
  • 🔧 Build System - Fast builds with tsup
  • 🎯 Linting - ESLint with TypeScript, Prettier, and JSON/Markdown support
  • 🪝 Git Hooks - Automated linting and commit message validation with Husky
  • 📋 Conventional Commits - Enforced commit message format
  • 🔄 Automated Releases - Scripts for GitHub and NPM releases
  • 📝 Changelog Generation - Automatic changelog generation
  • 🧪 Testing Ready - Test directory structure included

Quick Start

Installation

# Clone the template
git clone https://github.com/vrdons/module-template.git
cd module-template

# Install dependencies
npm install

Development

# Build the project
npm run build

# Lint code
npm run lint

# Fix linting issues
npm run lint:fix

Project Structure

module-template/
├── src/                    # Source code
│   └── index.ts           # Main entry point
├── dist/                  # Built output (generated)
├── tests/                 # Test files
├── scripts/               # Build and automation scripts
│   ├── actions/          # GitHub Actions and release scripts
│   ├── husky/            # Git hook scripts
│   └── utils/            # Utility functions
├── .github/              # GitHub workflows
├── .husky/               # Husky git hooks
└── ...config files

Scripts

| Script | Description | |--------|-------------| | npm run build | Build the project with tsup | | npm run lint | Run ESLint on all files | | npm run lint:fix | Fix ESLint issues automatically | | npm run changelog | Generate changelog from commits | | npm run release:git | Create GitHub release | | npm run release:npm | Publish to NPM |

Configuration

TypeScript

The project uses modern TypeScript configuration with:

  • Target: ES2024
  • Module: NodeNext with full ESM/CJS interop
  • Output: Dual package (ESM + CJS) with type declarations

Build System

tsup is configured to:

  • Bundle TypeScript source code
  • Generate both ESM and CJS formats
  • Create type declaration files
  • Clean output directory on each build
  • Run post-build patches

Code Quality

  • ESLint: TypeScript, Prettier, JSON, and Markdown linting
  • Prettier: Code formatting with consistent style
  • Husky: Pre-commit hooks for linting and commit message validation
  • Commitlint: Enforces conventional commit format

Package Exports

The module supports both CommonJS and ESM imports:

// ESM
import { version } from 'module-template';

// CommonJS
const { version } = require('module-template');

Development Workflow

  1. Make changes to source code in src/
  2. Build with npm run build
  3. Lint with npm run lint
  4. Commit using conventional commit format
  5. Release with automated scripts

Commit Message Format

This project follows Conventional Commits:

type(scope): description

feat: add new feature
fix: resolve bug
docs: update documentation
style: formatting changes
refactor: code restructuring
test: add tests
chore: maintenance tasks

Release Process

GitHub Release

npm run release:git

NPM Release

npm run release:npm

License

MIT License - see LICENSE file for details.

Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Follow the commit message format
  5. Submit a pull request

Author

vrdons - GitHub Profile


This template provides a solid foundation for TypeScript modules with modern tooling and best practices. Customize it according to your project's specific needs.