Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -278,9 +278,14 @@ cd leafwiki

cd ui/leafwiki-ui
npm install
npm run dev # Starts Vite dev server on http://localhost:5173

# 3. In another terminal, start the backend
# 3. Configure precommit hooks
npm run prepare # Sets up husky git hooks / Needs to be started from ui/leafwiki-ui folder

# 4. Start the frontend in dev mode
npm run dev

# 5. In another terminal, start the backend

cd ../../cmd/leafwiki
go run main.go
Expand Down
5 changes: 5 additions & 0 deletions ui/leafwiki-ui/.husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# switch to directory / .husky needs to run in the root level

cd $(dirname "$0")

npm run format
1 change: 1 addition & 0 deletions ui/leafwiki-ui/.prettierrc
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@
"useTabs": false,
"singleQuote": true,
"semi": false,
"endOfLine": "lf",
"plugins": ["prettier-plugin-tailwindcss"]
}
43 changes: 18 additions & 25 deletions ui/leafwiki-ui/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion ui/leafwiki-ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
"lint": "eslint .",
"lint:fix": "eslint . --fix",
"preview": "vite preview",
"format": "prettier --write src/**"
"format": "prettier --write src/**",
"prepare": "husky"
},
"dependencies": {
"@codemirror/basic-setup": "^0.20.0",
Expand Down Expand Up @@ -64,6 +65,7 @@
"eslint-plugin-react-hooks": "^7.0.1",
"eslint-plugin-react-refresh": "^0.4.20",
"globals": "^16.2.0",
"husky": "^9.1.7",
"postcss": "^8.5.3",
"prettier": "^3.5.3",
"prettier-plugin-tailwindcss": "^0.7.1",
Expand Down