Fix bugs in build scripts

This commit is contained in:
Guangcong Luo
2016-03-05 06:01:11 -05:00
parent 573c8ae351
commit 43fd00f0cf
2 changed files with 3 additions and 1 deletions

View File

@@ -567,7 +567,7 @@ process.stdout.write("Building `data/moves,items,abilities,typechart,learnsets.j
{
const Movedex = requireNoCache('../data/Pokemon-Showdown/data/moves.js').BattleMovedex;
var buf = 'exports.BattleMovedex = ' + es3stringify(Movedex) + ';';
fs.writeFileSync(path.resolve(dataDir, 'search-index.js'), buf);
fs.writeFileSync(path.resolve(dataDir, 'moves.js'), buf);
}
/*********************************************************

View File

@@ -102,6 +102,8 @@ function updateLearnsets (callback) {
const Pokedex = Tools.data.Pokedex;
const Learnsets = Tools.data.Learnsets;
var newLearnsetsG6 = {};
var oldLearnsetsG6;
try {
oldLearnsetsG6 = require(path.join(rootDir, 'data', 'learnsets-g6.js')).BattleLearnsets;