@flesh-and-blood/cards 7.2.0 → 7.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +8 -3
- package/dist/cards.js +24 -16
- package/dist/index.cjs +24 -16
- package/package.json +5 -4
package/README.md
CHANGED
|
@@ -30,11 +30,16 @@ Card data is sourced from the amazing
|
|
|
30
30
|
## The data pipeline
|
|
31
31
|
|
|
32
32
|
`src/cards.ts`, the card array, is a **generated file that is committed, never hand-edit it.** Regenerate
|
|
33
|
-
|
|
33
|
+
every generated file with `npm run transform`: it builds `@flesh-and-blood/types`, runs the data step
|
|
34
|
+
below, builds this package, then runs `tts` and `sitemap`. CI runs the same command and fails if any of
|
|
35
|
+
`src/cards.ts`, `latest-set/index.ts`, `tts/tts.txt` or `sitemap/sitemap-cards.xml` drifts, and the
|
|
36
|
+
pre-commit hook runs it whenever a commit stages a card source. `npm run full` runs `transform`, then
|
|
37
|
+
the tests and the new-card report.
|
|
34
38
|
|
|
35
|
-
### transform: `scripts/index.ts`
|
|
39
|
+
### transform:data: `scripts/index.ts`
|
|
36
40
|
|
|
37
|
-
|
|
41
|
+
`npm run transform:data` runs only this step. It reads the source data, computes derived fields, and
|
|
42
|
+
writes the output:
|
|
38
43
|
|
|
39
44
|
1. **Spoiled** cards from `scripts/Spoiled/*.csv` (Google Sheets exports, one per set), parsed/mapped by `scripts/Spoiled/{parser,mapper}.ts`.
|
|
40
45
|
2. **Released** cards from `scripts/Released/card.json` + `set.json` (sourced from the-fab-cube/flesh-and-blood-cards), parsed/mapped by `scripts/Released/{parser,mapper}.ts`.
|