typescript package bundler with tsup
Go to file Use this template
Matthieu Morin 1e08b57071 Tab should be 4 spaces, some prettier configs...
relevant updates can be seen in the config, reasoning: standardization of further work
2024-06-06 14:11:54 +02:00
.husky 🎨 fixing husky msgs 2024-06-04 13:27:36 +02:00
.vscode style(editorconfig and vscode(ium) settings): added formatting workspace settings 2024-06-04 11:47:13 +02:00
src lock and test 2024-06-04 00:00:58 +02:00
.editorconfig style(editorconfig and vscode(ium) settings): added formatting workspace settings 2024-06-04 11:47:13 +02:00
.gitignore style(editorconfig and vscode(ium) settings): added formatting workspace settings 2024-06-04 11:47:13 +02:00
.prettierignore set up prettier 2024-06-03 23:59:07 +02:00
.prettierrc Tab should be 4 spaces, some prettier configs... 2024-06-06 14:11:54 +02:00
LICENSE Initial commit 2024-05-20 21:36:28 +00:00
README.md Beginning documentation 2024-06-06 14:08:30 +02:00
eslint.config.js fix(eslint config): fixed flat config, specific plugins to respective langs 2024-06-04 10:43:21 +02:00
jest.config.cjs set up jest 2024-06-03 23:58:47 +02:00
package.json Beginning documentation 2024-06-06 14:08:30 +02:00
pnpm-lock.yaml 📦 Lock & package update 2024-06-04 13:28:41 +02:00
tsconfig.json tsconfig outdir dist 2024-06-04 00:00:14 +02:00

README.md

TypeScript NPM Package Template

This is a boilerplate to jumpstart one's next TypeScript npm package development. It utilizes various tools to streamline development, testing, and publishing processes.

Features

TypeScript: For powerful type safety and improved code maintainability. tsup: A fast and efficient TypeScript bundler for streamlined development. pnpm: A package manager with features like workspaces and faster install times. (Optional, can be replaced with npm or yarn) Commitizen: Standardizes commit messages following the Conventional Commits specification. ESLint(New flat config!) & Prettier: Enforces code style and formatting consistency. Jest: A popular testing framework for unit and integration tests. Husky: Executes pre-commit hooks to ensure code quality and formatting before commits. Semantic Release: Automates versioning and changelog generation based on commit messages.

Getting Started

Clone it via bash or in git* web ui

git clone https://git.mattmor.in/Madmin/ts-npm-package-template.git $name
cd $name
sudo rm -rf .git
git init

Install dependencies:

pnpm install  # (or npm install or yarn install if you wish)
pnpm i -g commitizen cz-gitmoji


initialize your project to use the cz-conventional-changelog adapter by typing:

# pnpm otherwise go here for more pms https://github.com/commitizen/cz-cli
commitizen init cz-conventional-changelog --pnpm --save-dev --save-exact

set Landish/cz-gitmoji as default adapter globally

echo '{ "path": "cz-gitmoji" }' > ~/.czrc

Usage

Building:

pnpm run build  # (or npm run build or yarn build)

This creates a production-ready build of your package.

Committing:

Use git commit to generate standardized commit messages with cz thanks to this config: