Development Notes for ArcoMage HD
- Install dependencies:
yarn
- Start the project in development mode:
yarn start
- Before releasing a new version, run the checks:
yarn checkall
git add .
git commit -m "<YOURMESSAGE>"
- To bump the version, tag it, and push:
yarn tool:version a.b.c
- This will automatically handle the following tasks:
yarn version a.b.c
git add .
git commit -m "chore: bump version to va.b.c"
git tag -a va.b.c -m "chore: bump version to va.b.c"
git push --follow-tags
- When adding a new language, also update
og:locale:alternate
in ./src/index.html.ejs. - If there are changes to the description, search the first few words in the entire project and replace them:
- The following files should be updated:
- ./assets/logo/manifest.template.ts
- ./webpack.config.js
- ./package.json
- ./src/i18n/main/en.ts
- The following file should be regenerated:
- ./assets/logo/manifest.json
- The following files should be updated:
- Husky and commitlint are no longer used.
yarn
: Install dependenciesyarn start
: Start the project in development modeyarn build
: Build the project in production modeyarn build:local
: Build the project in both production and local modeyarn checkall
: Run tests, format with Prettier, lint with ESLint, and check typesyarn test
: Run tests with Jestyarn format
: Format code using Prettieryarn lint
: Lint code using ESLintyarn typecheck
: Check TypeScript typesyarn tool:ts <file>
: Run a TypeScript file (e.g.,yarn tool:ts ./tools/zhconvert
). It is recommended to install bun and usebun ./tools/zhconvert
insteadyarn tool:version a.b.c
: Update the version toa.b.c
inpackage.json
, create a tag, and commit changesyarn tool:zhconvert
: Convert text from zh-Hans to zh-Hant (used for 'cards' & 'main', not 'taverns')yarn tool:imgpc
: Extract (crop) images from the original game’s big imageyarn tool:imgmin
: Minify images (the minified PNG images are stored in./img-min/original/
before being converted to .webp)yarn tool:datapc
: Extract card data from an Excel fileyarn tool:taverns
: Extract tavern data from an Excel fileyarn tool:geticelist
: Fetch a free STUN server listyarn tool:manifest
: Generatemanifest.json
and iconsyarn tool:ocr:pre
: Prepare OCR processingyarn tool:ocr
: Extract card text in different languagesyarn tool:i18ncheck:card
: Check card localizationyarn tool:i18ncheck:main
: Check main localizationyarn tool:i18ncheck:specific
: Validate all localization with language-specific rulesyarn tool:calcscore
: Compute all card scores (for AI)yarn tool:cardbalance
: Analyze accumulated card effect results (for balancing probabilities)yarn tool:i18nextract
: Extract tavern translationsyarn tool:i18njs2text
: Convert localization scripts to pure textyarn tool:i18ntext2js
: Convert pure text back to localization scriptsyarn tool:cardsbk
: Backup card data to./__test__/cardsbk.ts
yarn tool:resizesvg
: Resize SVG images in./misc/readme_images/
yarn tool:reduxreducers
: Remove duplicate auto-generated reducer tests from Redux DevToolsyarn linecount
: Get the total line count of the project
Note: All yarn tool:
commands require bun to be installed globally. Previously, yarn tool:ts
(with ts-node
) was used, but this slower approach is no longer recommended.