Giter Site home page Giter Site logo

jorgecoke / pack-a-punch-npm Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 779 KB

πŸ¦ΎπŸ”‹ 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 πŸ¦„

JavaScript 97.62% TypeScript 2.38%
commitizen commitlint cz emoji eslint formatter git hooks husky lint linter npm prettier

pack-a-punch-npm's Introduction

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

  • 🎨 ESLint & Prettier as linter and formatter
  • 🐢 Pre-Commit and Commit Husky hooks (Runs linter and formatter before any commit against staged files only!)
  • πŸ’„ Commit nomenclature rules following Conventional Commit Format and Commitizen CLI (emoji powered)
  • πŸš€ Release management policy with commit-and-tag-version, including automagically CHANGELOG.md generation, version bumping and GitTags
  • πŸ”¦ Included npm-check to check for outdated, incorrect, and unused dependencies.
  • πŸ₯·πŸ» Included better-npm-audit to check for dependency vulnerabilities

πŸ›  Getting Started

npm ci               # Install dependencies
npm run dev          # Launch project locally

🎨 Linter & Formatter

npm run lint         # Run ESLint
npm run format       # Run Prettier

β›© 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

How to migrate this configuration to an existing project

  1. Install dependencies
npm install --save-dev @commitlint/cli @commitlint/config-conventional better-npm-audit commit-and-tag-version commitizen cz-conventional-changelog devmoji husky lint-staged npm-check

(Optional) Install ESLint and Prettier if you don't have them already: npm install --save-dev prettier eslint @typescript-eslint/eslint-plugin @typescript-eslint/parser eslint-plugin-sonarjs

  1. Copy the following scripts to your package.json file:
  • format:staged
  • npm:audit
  • npm:check
  • release
  • cz
  • devmoji
  • prepare

(Optional) You can also copy lint and format commands if needed

  1. Copy the corresponding config files
cp -R {.husky,.commitlintrc.cjs,.czrc,.lintstagedrc.cjs} <YOUR_DESTINATION_FOLDER>

(Optional) Copy ESLint, Prettier and VSCode config files: cp -R {.vscode,.prettierrc.cjs,.eslintrc.cjs} <YOUR_DESTINATION_FOLDER>

  1. Prepare husky tools running:
npm run prepare

pack-a-punch-npm's People

Contributors

jorgecoke avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.