mirror of
https://github.com/MadeBaruna/paimon-moe.git
synced 2025-03-13 19:27:45 +01:00
minify output of TCG indexer
This commit is contained in:
parent
9d051b0c1d
commit
95586f3860
3 changed files with 5 additions and 43374 deletions
|
@ -8,7 +8,7 @@
|
|||
"build": "cross-env NODE_OPTIONS=--max_old_space_size=4096 vite build",
|
||||
"preview": "vite preview",
|
||||
"start": "node build",
|
||||
"index-tcg": "npx tsx scripts/tcgIndexer.ts"
|
||||
"index-tcg": "tsx scripts/tcgIndexer.ts"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@andreekeberg/imagedata": "^1.0.2",
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// Run with "npm run index-tcg"
|
||||
// Run with "pnpm index-tcg"
|
||||
import * as fs from 'fs';
|
||||
import * as path from 'path';
|
||||
import cv from 'opencv-ts';
|
||||
|
@ -47,9 +47,9 @@ async function onRuntimeInitialized() {
|
|||
"characters": charactersIndex,
|
||||
"actions": actionsIndex
|
||||
},
|
||||
(k, v) => ArrayBuffer.isView(v) ? Array.from(v as unknown as ArrayLike<unknown>) : v, 2);
|
||||
(k, v) => ArrayBuffer.isView(v) ? Array.from(v as unknown as ArrayLike<unknown>) : v, 0);
|
||||
try {
|
||||
fs.writeFileSync(indexFilename, "export const tcgIndex = " + cardsIndexJson);
|
||||
fs.writeFileSync(indexFilename, "export const tcgIndex=" + cardsIndexJson);
|
||||
console.log(`Saved index data to ${indexFilename}`);
|
||||
} catch (err) {
|
||||
console.error(err);
|
||||
|
|
43371
src/data/tcgIndex.js
43371
src/data/tcgIndex.js
File diff suppressed because one or more lines are too long
Loading…
Add table
Reference in a new issue