An open API service indexing awesome lists of open source software.

https://github.com/jorgecoke/pack-a-punch-npm

πŸ¦ΎπŸ”‹ Pack a punch your NPM project, following standards and specifications, linting and formatting your code, automating Git work flows, and improving your styles with emojis πŸ¦„
https://github.com/jorgecoke/pack-a-punch-npm

commitizen commitlint cz emoji eslint formatter git hooks husky lint linter npm prettier

Last synced: about 1 month ago
JSON representation

πŸ¦ΎπŸ”‹ Pack a punch your NPM project, following standards and specifications, linting and formatting your code, automating Git work flows, and improving your styles with emojis πŸ¦„

Awesome Lists containing this project

README

        


Pack a Punch logo


πŸ¦ΎπŸ”‹ Pack a Punch: NPM Project Template Boilerplate


Pack a punch your project, following standards and specifications, linting and formatting your code, automating Git work flows, and improving your styles with emojis πŸ¦„

## ✨ Features

- πŸ›‘ [Zod](https://zod.dev/) **validator**
- 🎨 The best **linter** and **formatter**, [BiomeJS](https://biomejs.dev/)
- 🐢 Pre-Commit and Commit [Husky](https://github.com/typicode/husky) **hooks** (Runs linter and formatter before any commit against staged files only!)
- πŸ’„ Commit **nomenclature rules** following [Conventional Commit Format](https://commitlint.js.org/) and [Commitizen CLI](https://github.com/commitizen/cz-cli) (emoji [powered](https://github.com/folke/devmoji))
- πŸš€ **Release management policy** with [commit-and-tag-version](https://github.com/absolute-version/commit-and-tag-version), including automagically CHANGELOG.md generation, version bumping and GitTags
- πŸ”¦ Included [npm-check](https://www.npmjs.com/package/npm-check) to check for **outdated**, incorrect, and unused dependencies.
- πŸ₯·πŸ» Included [better-npm-audit](https://www.npmjs.com/package/better-npm-audit) to check for dependency **vulnerabilities**

## πŸ›  Getting Started

```
npm ci # Install dependencies
cp .env.example .env # Generate enviroment variables
npm run dev # Launch project locally
```

## 🎨 Linter & Formatter

```
npm run biome # Run Biome
```

## β›© Git Commit with Commitizen

```
git add . # Add files
npm run cz # Commit with Commitizen CLI
```

## πŸš€ Release a new version

```
npm run release # Bump version and generate CHANGELOG.md
git push --follow-tags # Push changes and GitTag to origin
```

## πŸ”¦ Check vulnerabilities and update outdated dependencies

```
npm run npm:audit # Check dependency vulnerabilities
npm run npm:check # Check outdated dependencies
```

## πŸ— Build and launch

```
npm run build # Compile project
npm run start # Launch
npm run package # Package an artifact
```

---

#### How to migrate this configuration to an existing project

1. Install dependencies

```bash
npm install --save-dev @biomejs/biome @commitlint/cli @commitlint/config-conventional commit-and-tag-version commitizen cz-conventional-changelog devmoji husky lint-staged
```

2. Copy the following scripts to your package.json file:

- biome
- release
- package
- cz
- npm:check
- npm:audit
- prepare

3. Copy the "config", "commitlint" and "lint-staged" configuration objects to your package.json

4. Copy the corresponding config files

```bash
cp -R {.husky,.vscode,biome.json}
```

5. Prepare husky tools running:

```bash
npm run prepare
```