52 lines
1.6 KiB
Markdown
52 lines
1.6 KiB
Markdown
# Code Count
|
|
|
|
Code Count is a Wails v2 desktop application for local source-code and Git analytics. The Go backend scans source files with gocloc, reads Git history through the installed `git` executable, and persists analysis snapshots in SQLite. The Vue 3 frontend provides Chinese/English and light/dark themes.
|
|
|
|
## Requirements
|
|
|
|
- Go 1.25+
|
|
- Node.js 20+
|
|
- Wails CLI 2.12+
|
|
- Git (optional; required only for Git analytics)
|
|
|
|
## Development
|
|
|
|
```powershell
|
|
cd frontend
|
|
npm install
|
|
cd ..
|
|
wails dev
|
|
```
|
|
|
|
The database is created under the operating system's user configuration directory in `CodeCount/code-count.db`. Its location can be changed from Settings.
|
|
|
|
## Tests and builds
|
|
|
|
```powershell
|
|
go test ./...
|
|
cd frontend
|
|
npm run build
|
|
cd ..
|
|
wails build
|
|
```
|
|
|
|
Windows builds produce `build/bin/code-count.exe`. Run `wails build -platform darwin/universal` on macOS to create the macOS application bundle.
|
|
|
|
## About
|
|
|
|
This is the official Wails Vue template.
|
|
|
|
You can configure the project by editing `wails.json`. More information about the project settings can be found
|
|
here: https://wails.io/docs/reference/project-config
|
|
|
|
## Live Development
|
|
|
|
To run in live development mode, run `wails dev` in the project directory. This will run a Vite development
|
|
server that will provide very fast hot reload of your frontend changes. If you want to develop in a browser
|
|
and have access to your Go methods, there is also a dev server that runs on http://localhost:34115. Connect
|
|
to this in your browser, and you can call your Go code from devtools.
|
|
|
|
## Building
|
|
|
|
To build a redistributable, production mode package, use `wails build`.
|