Skip to content

Commit

Permalink
chore: add commitzen to repo (#3)
Browse files Browse the repository at this point in the history
* chore: add commitzen to repo

* fix: fix panda paths and add commitzen

* fix: fix formatting

* docs: add contributing guide
  • Loading branch information
Fazla-GroM authored Sep 3, 2024
1 parent 6bbe49f commit 622f0a8
Show file tree
Hide file tree
Showing 6 changed files with 737 additions and 2 deletions.
3 changes: 3 additions & 0 deletions .czrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"path": "@commitlint/cz-commitlint"
}
53 changes: 53 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# Contributing to Treblle Documentation Platform

## Preparing your enviroment

### Node setup

This repo has managed Node version via `.node-version` file so it's mandatory to have some node version management tool installed.
We recommend either:

- [fnm](https://github.com/Schniz/fnm) (built with Rust, much faster)
- [nvm](https://github.com/nvm-sh/nvm)

### Package manager setup

The official package manager for monorepo is defined in root `package.json` file under `packageManager` field.
Our current package manager is [pnpm](https://pnpm.io/).

To install a package manager in currently used Node version run:

```sh
corepack enable
```

## Installing

After `pnpm` is installed run following command from monorepo root:

```sh
pnpm install
```

## Updating dependencies

To check for outdated dependencies, run:

```sh
pnpm outdated
```

For more extensive information see [official docs](https://pnpm.io/cli/outdated)

## Commits and release versioning

Commit standards are based on [`@commitlint/config-conventional`](https://github.com/conventional-changelog/commitlint/blob/master/%40commitlint/config-conventional).

For the sake of simplicity we are using [`commitizen`](https://commitizen.github.io/cz-cli/)

### Creating a commit

- stage changes you want to commit
- run `pnpm commit` and follow the instructions
- push your changes
- profit 💰
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
"author": "Treblle <[email protected]>",
"scripts": {
"build": "next build",
"commit": "cz",
"dev": "rm -rf .next && next dev",
"format:check": "prettier . --check",
"format:fix": "prettier . --write",
Expand All @@ -32,13 +33,15 @@
"devDependencies": {
"@commitlint/cli": "^19.4.1",
"@commitlint/config-conventional": "^19.4.1",
"@commitlint/cz-commitlint": "^19.4.0",
"@next/eslint-plugin-next": "14.2.7",
"@pandacss/dev": "^0.45.2",
"@types/node": "^20",
"@types/react": "^18",
"@types/react-dom": "^18",
"@typescript-eslint/eslint-plugin": "^8.4.0",
"@typescript-eslint/parser": "^8.4.0",
"commitizen": "^4.3.0",
"eslint": "^8",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-jsx-a11y": "^6.9.0",
Expand Down
2 changes: 1 addition & 1 deletion panda.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export default defineConfig({
preflight: true,

// Where to look for your css declarations
include: ["./app/**/*.{ts,tsx}", "./components/**/*.{ts,tsx}"],
include: ["./app/**/*.{ts,tsx}", "./pages/**/*.{ts,tsx}", "./components/**/*.{ts,tsx}"],

// Files to exclude
exclude: [],
Expand Down
Loading

0 comments on commit 622f0a8

Please sign in to comment.