mirror of
https://github.com/MichaelMure/git-bug.git
synced 2024-12-17 21:31:29 +03:00
fb6b2d873e
WebUI: Edit comments and inspect edit history |
||
---|---|---|
.. | ||
public | ||
src | ||
types | ||
.eslintrc.js | ||
.gitignore | ||
.prettierrc | ||
codegen.yaml | ||
debug_assets.go | ||
handler.go | ||
Makefile | ||
pack_webui.go | ||
package-lock.json | ||
package.json | ||
packed_assets.go | ||
Readme.md | ||
tsconfig.json |
git-bug rich web UI
Prerequisites
ReactJS | Material UI | GraphQL | Apollo GraphQL
How to develop
Run GraphQL backend
-
Download a git-bug stable binary or compile your own by running
make
in the root directory: -
Run the git-bug binary inside your git repository. It will manage issues and start the API:
git-bug webui -p 3001
Run ReactJS front-end
-
If you haven't already, clone the git-bug repository:
-
Enter the
webui
directory and install the needed libraries:make install
ornpm install
-
Generate the TS code from the GrapQL files and run the webui in development mode:
make start
ornpm start
- If you get some lint errors, run the lint command below and start again:
make fix-lint
ornpm run lint -- --fix
make start
ornpm start
The development version of the WebUI is configured to query the backend on the port 3001. You can now live edit the js code and use the normal backend.
Bundle the web UI
Once the webUI is good enough for a new release:
- run
make build
from webui folder - run
make pack-webui
from the root directory to bundle the compiled js into the go binary.- You must have Go installed on Your machine to run this command.