A template for NPM packages in TypeScript.
Ensure you have the following installed on your system:
- Bun: Installation Documentation
- Node.js: Download and Installation
Make sure both are added to your system's PATH.
Clone the repository:
git clone https://github.com/Ram-Amoncar/npm-package-template.git your-package-name
Install dependencies:
bun install
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.
This project is licensed under the Unlicense - see the LICENSE file for details.
- 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.