mirror of
https://github.com/smogon/pokemon-showdown-client.git
synced 2026-03-21 17:50:29 -05:00
Disable building sets
Removes a dependency on @smogon/sets. Sets will have to be manually copied to data/sets
This commit is contained in:
parent
9ab527b91a
commit
0830c457d6
3
build
3
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();
|
||||
|
|
|
|||
|
|
@ -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}`);
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user