Skip to content

barrywire/next-tailwind

Repository files navigation

Next Tailwind

The repository is a nifty starter pack for all Next.js and Tailwind CSS projects. It contains the following packages and installations out of the box:

  1. NextJs
  2. Tailwind CSS
  3. Sass
  4. Commitlint
  5. Husky

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 config 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"