From 0830c457d67368616b340a18357993e5c9314cdc Mon Sep 17 00:00:00 2001 From: Christopher Monsanto Date: Mon, 27 Jun 2022 22:42:03 -0400 Subject: [PATCH] Disable building sets Removes a dependency on @smogon/sets. Sets will have to be manually copied to data/sets --- build | 3 --- build-tools/build-sets | 25 ------------------------- 2 files changed, 28 deletions(-) delete mode 100755 build-tools/build-sets diff --git a/build b/build index 39bf32661..b4ee9a802 100755 --- a/build +++ b/build @@ -49,9 +49,6 @@ case 'minidex': case 'sprites': execSync(`node ./build-tools/build-minidex`, options); break; -case 'sets': - execSync(`node ./build-tools/build-sets`, options); - break; case 'replays': execSync(`node ./replays/build`, options); process.exit(); diff --git a/build-tools/build-sets b/build-tools/build-sets deleted file mode 100755 index 1b3120224..000000000 --- a/build-tools/build-sets +++ /dev/null @@ -1,25 +0,0 @@ -#!/usr/bin/env node -'use strict'; - -const fs = require("fs"); -const child_process = require('child_process'); -const path = require("path"); - -process.stdout.write("Importing sets from @smogon/sets... "); - -const shell = cmd => child_process.execSync(cmd, {stdio: 'inherit', cwd: path.resolve(__dirname, '..')}); -shell(`npm install --no-audit --no-save @smogon/sets`); - -const src = path.resolve(__dirname, '../node_modules/@smogon/sets'); -const dest = path.resolve(__dirname, '../data/sets'); - -try { - fs.mkdirSync(dest); -} catch (err) { - if (err.code !== 'EEXIST') throw err; -} - -for (const file of fs.readdirSync(src)) { - if (!file.endsWith('.json')) continue; - fs.copyFileSync(`${src}/${file}`, `${dest}/${file}`); -}