New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

@vrdons/module-template

Package Overview
Dependencies
Maintainers
0
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@vrdons/module-template

Module template

latest
Source
npmnpm
Version
0.0.4
Version published
Maintainers
0
Created
Source

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

ScriptDescription
npm run buildBuild the project with tsup
npm run lintRun ESLint on all files
npm run lint:fixFix ESLint issues automatically
npm run changelogGenerate changelog from commits
npm run release:gitCreate GitHub release
npm run release:npmPublish 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

  • Make changes to source code in src/
  • Build with npm run build
  • Lint with npm run lint
  • Commit using conventional commit format
  • 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

  • Fork the repository
  • Create a feature branch
  • Make your changes
  • Follow the commit message format
  • 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.

FAQs

Package last updated on 02 Aug 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts