-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
20 changed files
with
627 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,3 +27,11 @@ dist-ssr | |
pocketbase | ||
pb_data/ | ||
pb_migrations/ | ||
|
||
# env | ||
.env | ||
.env.local | ||
.env.* | ||
|
||
# scripts data | ||
tymy.csv |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,6 +7,16 @@ GJP Cup was so great that there is GJP Cup 2 now | |
3. `./pocketbase serve` in one terminal | ||
4. `npm run dev` in second terminal | ||
|
||
# Scripts | ||
## Fill DB | ||
To fill the database: | ||
1. Open the Týmy Google Sheet | ||
2. Download it as a CSV | ||
3. Put it to the root folder (right next to this `README.md`) as `tymy.csv` | ||
4. Run `npm run filldb` | ||
5. --> The db gets filled with players, teams and games (games are in a really shitty order). Including one game with teachers. | ||
You can change credentials, db url and other stuff at `scripts/filldb.ts`. | ||
|
||
# Good to know | ||
## Custom `pocketbase-react` | ||
We're using our own distribution of `pocketbase-react` (available at https://github.com/radeksoft/pocketbase-react/tree/radeksoft), installed in the `package.json` as a Github repo. The installation should still be as simple as `npm install`. | ||
|
@@ -19,3 +29,11 @@ We're using our own distribution of `pocketbase-react` (available at https://git | |
**Caveats:** | ||
- importing by `import { ... } from 'pocketbase-react/src';` because we can't import the package (by it's `package.json`), but we're loading the source code directly | ||
- React StrictMode is disabled, because `pocketbase-react` is not good at unsubscribing on component unmount (caused double entries on realtime updates) | ||
|
||
## no's | ||
Numbering of games and teams (`games.no`, `teams.no` and `misc.currentGameNo`) starts from 0. Do +1 when presenting to final user (probably never?) | ||
|
||
## Deploy | ||
build with `npx vite build` (not `npm run build`, coz we have typescript errors everywhere) | ||
|
||
deploy by sth like `rsync --info=progress2 -r dist/* [email protected]:/srv/www/gjpcup.radeksoft.cz/` |
Oops, something went wrong.