Skip to content

Ram-Amoncar/npm-package-template

Repository files navigation

NPM-PACKAGE-TEMPLATE

License: Unlicense

A template for NPM packages in TypeScript.

Table of Contents

Installation

Clone the repository:

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

Install dependencies:

npm install

Scripts

  • npm run build ➡️ Build the TypeScript code using tsup.
  • npm test ➡️ Run Jest tests.
  • npm run test:watch ➡️ Run Jest tests in watch mode.
  • npm run coverage ➡️ Run Jest tests with coverage.
  • npm run format ➡️ Format code using Prettier.
  • npm run format:check ➡️ Check if code is formatted using Prettier.
  • run lint ➡️ Run ESLint for linting TypeScript files.
  • npm 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.