Skip to content

A clean & simple template for NPM packages in TypeScript.

License

Notifications You must be signed in to change notification settings

ram-amoncar/npm-package-template

Repository files navigation

NPM-PACKAGE-TEMPLATE

License: Unlicense

A template for NPM packages in TypeScript.

Table of Contents

Prerequisites

Ensure you have the following installed on your system:

Make sure both are added to your system's PATH.

Installation

Clone the repository:

git clone https://github.com/Ram-Amoncar/npm-package-template.git your-package-name

Install dependencies:

bun install

Scripts

  • bun run build ➡️ Build the TypeScript code using tsup.
  • bun run test ➡️ Run Jest tests.
  • bun run test:watch ➡️ Run Jest tests in watch mode.
  • bun run coverage ➡️ Run Jest tests with coverage.
  • bun run format ➡️ Format code using Prettier.
  • bun run format:check ➡️ Check if code is formatted using Prettier.
  • bun run lint ➡️ Run ESLint for linting TypeScript files.
  • bun run lint:fix ➡️ Run ESLint with the --fix flag to - - automatically fix linting issues.

License

This project is licensed under the Unlicense - see the LICENSE file for details.

Acknowledgments

  • Jest ➡️ Delightful JavaScript Testing.
  • Tsup ➡️ Zero-config TypeScript bundler.
  • TypeScript ➡️ Typed superset of JavaScript.
  • Eslint ➡️ Pluggable linting utility for JavaScript and TypeScript.
  • Prettier ➡️ Opinionated code formatter.
  • Husky ➡️ Git hooks made easy.
  • Bun ➡️ Incredibly fast JavaScript runtime.