mirror of
https://github.com/samsonjs/spirit-tracker.git
synced 2026-03-25 09:25:51 +00:00
feat: Better Script coop
This commit is contained in:
parent
9f078e9d05
commit
a479df0d76
1 changed files with 2 additions and 0 deletions
|
|
@ -7,6 +7,7 @@ const DB_DIR = path.join(__dirname, "../data/db");
|
|||
const LINKS_FILE = path.join(__dirname, "../data/sku_links.json");
|
||||
|
||||
const includeKegNCork = process.argv.includes("--include-kegncork");
|
||||
const includeCoop = process.argv.includes("--include-coop");
|
||||
const includeLinked = process.argv.includes("--include-linked");
|
||||
|
||||
// load linked SKUs
|
||||
|
|
@ -23,6 +24,7 @@ for (const file of fs.readdirSync(DB_DIR)) {
|
|||
if (!file.endsWith(".json")) continue;
|
||||
|
||||
if (!includeKegNCork && file.startsWith("kegncork__")) continue;
|
||||
if (!includeCoop && file.startsWith("coop__")) continue;
|
||||
|
||||
const data = JSON.parse(fs.readFileSync(path.join(DB_DIR, file), "utf8"));
|
||||
if (!Array.isArray(data.items)) continue;
|
||||
|
|
|
|||
Loading…
Reference in a new issue