Skip to content

A starter pack for creating an npm package using typescript, tsup, pnpm and biomejs

License

Notifications You must be signed in to change notification settings

rahulpeacock/npm-starter-kit

Repository files navigation

🚀 Npm Package Stack

A minimal starter kit designed to build and publish a npm package with ease.

The Stack includes

Installation

  1. Fork the repository
  2. Clone the repository git clone https://github.com/<your_github_username>/npm-starter-kit.git
  3. Navigate to the directory cd npm-package-stack
  4. Make sure you edit the below properties in the package.json file
    • name
    • version
    • description
    • homepage
    • repository
    • keywords
    • author
    • license
  5. Install dependencies pnpm install
  6. For more scripts refer to package.json file

Make sure you have Node.js and pnpm installed in your machine

Scripts and Commands

  1. pnpm build - compiles the typescript code using tsup with tsup.config.ts file as configuration
  2. pnpm lint - lints the project using tsc
  3. pnpm check-exports - checks if all exports from the package are correct
  4. pnpm run ci - runs the CI process for GitHub actions
  5. pnpm format - formats the project using biome
  6. pnpm format:check - check if all files in the project are formatted correctly
  7. pnpm test - test the project using vitest
  8. pnpm dev - test the project using vitest in watch mode
  9. pnpm local-release - run changeset version and publish the package to npm using pnpm run release
  10. pnpm release - run the publish-package script using turbo
  11. pnpm publish-package - publish the package to npm using changeset publish

Project Structure

# GitHub
.
├── src
│   ├── functions.ts
│   ├── index.ts
│   └── types.ts
├── .gitignore
├── .npmignore
├── biome.json
├── package.json
├── pnpm-lock.yaml
├── README.md
├── tsconfig.json
├── tsup.config.ts
└── turbo.json
# Npm
.
├── dist
│   ├── index.d.mts
│   ├── index.d.ts
│   ├── index.js
│   └── index.mjs
├── CHANGELOG.md
├── LICENSE
├── README.md
└── package.json

Support & Contribute

If you found this project helpful or enjoyed using it, please consider giving it a ⭐️ on GitHub! It helps others find the project and motivates us to keep improving.

About

A starter pack for creating an npm package using typescript, tsup, pnpm and biomejs

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published