update and add number theory page
This commit is contained in:
@@ -41,25 +41,30 @@ Use this companion repository for downloadable decks:
|
||||
Typical flow:
|
||||
|
||||
1. Clone the deck repository somewhere local.
|
||||
2. Copy one or more deck folders into `asset/tarot deck/`.
|
||||
3. Validate and regenerate the deck registry.
|
||||
2. Copy a deck folder into `asset/tarot deck/` (repeat for more decks as needed).
|
||||
3. Start the app to pick up the deck list.
|
||||
|
||||
```powershell
|
||||
git clone https://code.glowers.club/goyimnose/tarot-deck.git
|
||||
# Copy selected deck folder(s) into Tarot Time deck directory.
|
||||
npm run validate:decks
|
||||
# Copy a deck folder into asset/tarot deck/.
|
||||
npm run start
|
||||
```
|
||||
|
||||
Auto-discovery behavior:
|
||||
|
||||
- Deck ID is automatically inferred from the deck folder path when possible.
|
||||
- Deck name is automatically generated from the ID when no label is provided.
|
||||
- Example: `rider-waite-smith` becomes `Rider Waite Smith`.
|
||||
|
||||
## Deck Authoring and Validation
|
||||
|
||||
Deck discovery is registry-driven and generated automatically.
|
||||
Deck discovery is folder-driven and automatic.
|
||||
|
||||
1. Copy `asset/tarot deck/_template/` to a new folder under `asset/tarot deck/`.
|
||||
2. Rename the new folder and update its `deck.json`.
|
||||
3. Add card image files matching the naming rules in the manifest.
|
||||
4. Run `npm run validate:decks` before publishing/testing.
|
||||
5. Run `npm run start` (or `npm run generate:decks`) to rebuild `asset/tarot deck/decks.json`.
|
||||
2. Rename the folder to the deck ID you want (for example `thoth-crowley`).
|
||||
3. Update `deck.json` and add card image files matching the naming rules in the manifest.
|
||||
4. `label` in `deck.json` is optional; when omitted, a readable name is auto-generated from the folder-based ID.
|
||||
5. Run `npm run start` and confirm the deck appears in Settings → Tarot Deck.
|
||||
|
||||
Rules and behavior:
|
||||
|
||||
@@ -70,15 +75,14 @@ Rules and behavior:
|
||||
- Decks can define `cardBack` in `deck.json`; if omitted, `back.webp/png/jpg/jpeg/avif/gif` in the deck root is auto-detected.
|
||||
- Manifests may override labels with `nameOverrides` and `minorNameOverrides`.
|
||||
- Invalid manifests or missing mapped files are skipped with terminal warnings.
|
||||
- If a deck entry does not include an explicit ID, the app derives it from the manifest path/folder.
|
||||
|
||||
## NPM Scripts
|
||||
|
||||
| Command | Description |
|
||||
| --- | --- |
|
||||
| `npm run start` | Generate deck registry, then serve the app locally and open `index.html`. |
|
||||
| `npm run start` | Serve the app locally and open `index.html`. |
|
||||
| `npm run dev` | Alias of `npm run start`. |
|
||||
| `npm run generate:decks` | Rebuild `asset/tarot deck/decks.json`. |
|
||||
| `npm run validate:decks` | Strict validation only (no write), exits on manifest/file problems. |
|
||||
|
||||
## Project Links
|
||||
|
||||
|
||||
Reference in New Issue
Block a user