pokemon-showdown-client/build
Guangcong Luo 15c73c922f Refactor build system
We no longer have the relevant Githook for automatic building, so
putting it in `githooks/` no longer makes much sense. It's now manually
called with a build script `./build`, like other PS websites (most
notably PSDex and the damagecalc).
2017-12-04 17:37:01 -05:00

36 lines
835 B
JavaScript
Executable File

#!/usr/bin/env node
const execSync = require('child_process').execSync;
const options = {cwd: __dirname, stdio: 'inherit'};
switch (process.argv[2] || '') {
case 'full':
execSync(`./build-tools/build-indexes`, options);
execSync(`./build-tools/build-learnsets`, options);
execSync(`./build-tools/build-minidex`, options);
break;
case 'indexes':
execSync(`./build-tools/build-indexes`, options);
break;
case 'learnsets':
execSync(`./build-tools/build-learnsets`, options);
break;
case 'minidex':
case 'sprites':
execSync(`./build-tools/build-minidex`, options);
break;
case 'replays':
execSync(`../replay.pokemonshowdown.com/build`, options);
process.exit();
break;
case '':
break;
default:
console.log(`Unrecognized command ${process.argv[2]}`);
process.exit();
break;
}
execSync(`./build-tools/update`, options);