Disable building sets

Removes a dependency on @smogon/sets. Sets will have to be manually copied to
data/sets
This commit is contained in:
Christopher Monsanto 2022-06-27 22:42:03 -04:00
parent 9ab527b91a
commit 0830c457d6
2 changed files with 0 additions and 28 deletions

3
build
View File

@ -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();

View File

@ -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}`);
}