Beginning documentation

how to use, names, includes, etc, TODO: more detailed dependency description, usage descriptions etc
This commit is contained in:
Matthieu Morin 2024-06-06 14:08:30 +02:00
parent b4b80c2a69
commit 24ec1b4566
3 changed files with 73 additions and 8 deletions

3
.czrc
View File

@ -1,3 +0,0 @@
{
"path": "./node_modules/cz-conventional-changelog"
}

View File

@ -1,3 +1,61 @@
# TS-Lib-tsup # TypeScript NPM Package Template
typescript package bundler with tsup 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
```sh
git clone https://git.mattmor.in/Madmin/ts-npm-package-template.git $name
cd $name
sudo rm -rf .git
git init
```
### Install dependencies:
```sh
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:
```sh
# 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
```sh
echo '{ "path": "cz-gitmoji" }' > ~/.czrc
```
## Usage
### Building:
```sh
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:

View File

@ -1,5 +1,5 @@
{ {
"name": "templ8-lib-tsup", "name": "ts-npm-package-template",
"version": "0.0.1", "version": "0.0.1",
"type": "module", "type": "module",
"description": "", "description": "",
@ -35,8 +35,18 @@
"./dist/**/*" "./dist/**/*"
], ],
"keywords": [ "keywords": [
"template", "tsup",
"yo" "typescript",
"commitizen",
"pnpm",
"prettier",
"eslint",
"jest",
"scripts",
"husky",
"CI/CD",
"boilerplate",
"template"
], ],
"scripts": { "scripts": {
"build": "run-s lint clean build:start", "build": "run-s lint clean build:start",