/next-bootstrap

Nextjs template with Bootstrap, Sass, Commitlint and Husky and their dependencies

Primary LanguageJavaScript

Next Basic Frontend - Bootstrap

This repository contains a basic template of a create-next-app that comes with the following packages out of the box:

  1. NextJs
  2. Bootstrap
  3. Bootstrap-Icons
  4. Sass
  5. Commitlint
  6. Husky
  7. Husky+Commitlint

It also has custom styling that has a base color scheme and a font scheme as well.

Getting Started

First, install the dependencies:

npm install
# or
yarn install

Then, run the development server:

npm run dev
# or
yarn dev

Setting up the commitlint

  • Create a commitlint file:
touch commitlint.config.js
  • Configure the commitlint file:
module.exports = {
  extends: ['@commitlint/config-conventional'],
};
  • Add a prepare step which enables husky to run the commitlint:
npm pkg set scripts.prepare "husky install"
  • Run the prepare step:
npm run prepare
  • Add a pre-commit step which runs the commitlint:
npx husky add .husky/pre-commit "npx --no-install commitlint --edit $1"

or

yarn husky add .husky/commit-msg "yarn commitlint --edit $1"