Reorganize directories (#2187)
Files meant to be served have been moved into `play.pokemonshowdown.com/` and `pokemonshowdown.com/`. We now have three directories for the three subdomains handled by this repo: - `pokemonshowdown.com/` - `play.pokemonshowdown.com/` - `replay.pokemonshowdown.com/` Naming them after the subdomains will make it much easier to tell where the files for each go. The diff is probably useless; it'll be easier if you just look at the new tree: https://github.com/smogon/pokemon-showdown-client/tree/reorganize
|
|
@ -1,16 +1,16 @@
|
|||
data/*
|
||||
node_modules/
|
||||
js/*
|
||||
/play.pokemonshowdown.com/data/*
|
||||
/play.pokemonshowdown.com/js/*
|
||||
|
||||
!/js/client-battle.js
|
||||
!/js/client-chat-tournament.js
|
||||
!/js/client-chat.js
|
||||
!/js/client-ladder.js
|
||||
!/js/client-mainmenu.js
|
||||
!/js/client-rooms.js
|
||||
!/js/client-teambuilder.js
|
||||
!/js/client-topbar.js
|
||||
!/js/client.js
|
||||
!/js/replay-embed.template.js
|
||||
!/js/search.js
|
||||
!/js/storage.js
|
||||
!/play.pokemonshowdown.com/js/client-battle.js
|
||||
!/play.pokemonshowdown.com/js/client-chat-tournament.js
|
||||
!/play.pokemonshowdown.com/js/client-chat.js
|
||||
!/play.pokemonshowdown.com/js/client-ladder.js
|
||||
!/play.pokemonshowdown.com/js/client-mainmenu.js
|
||||
!/play.pokemonshowdown.com/js/client-rooms.js
|
||||
!/play.pokemonshowdown.com/js/client-teambuilder.js
|
||||
!/play.pokemonshowdown.com/js/client-topbar.js
|
||||
!/play.pokemonshowdown.com/js/client.js
|
||||
!/play.pokemonshowdown.com/js/replay-embed.template.js
|
||||
!/play.pokemonshowdown.com/js/search.js
|
||||
!/play.pokemonshowdown.com/js/storage.js
|
||||
|
|
|
|||
46
.gitignore
vendored
|
|
@ -1,34 +1,34 @@
|
|||
/sprites/
|
||||
/audio/
|
||||
/config/
|
||||
/index.php
|
||||
/index.html
|
||||
/preactalpha.html
|
||||
/crossprotocol.html
|
||||
/data/*
|
||||
node_modules/
|
||||
eslint-cache/
|
||||
.DS_Store
|
||||
Thumbs.db
|
||||
npm-debug.log
|
||||
package-lock.json
|
||||
/config/
|
||||
/vendor/
|
||||
node_modules
|
||||
/caches/
|
||||
|
||||
/js/server/
|
||||
/js/*.js.map
|
||||
/js/battle*.js
|
||||
/js/panel*.js
|
||||
/js/replay-embed.js
|
||||
/js/client-main.js
|
||||
/js/client-core.js
|
||||
/js/client-connection.js
|
||||
/play.pokemonshowdown.com/sprites/
|
||||
/play.pokemonshowdown.com/audio/
|
||||
/play.pokemonshowdown.com/index.php
|
||||
/play.pokemonshowdown.com/index.html
|
||||
/play.pokemonshowdown.com/preactalpha.html
|
||||
/play.pokemonshowdown.com/crossprotocol.html
|
||||
/play.pokemonshowdown.com/data/*
|
||||
|
||||
/website/.well-known/
|
||||
/website/.pages-cached/
|
||||
/website/files/
|
||||
/website/images/
|
||||
/website/ads.txt
|
||||
/play.pokemonshowdown.com/js/server/
|
||||
/play.pokemonshowdown.com/js/*.js.map
|
||||
/play.pokemonshowdown.com/js/battle*.js
|
||||
/play.pokemonshowdown.com/js/panel*.js
|
||||
/play.pokemonshowdown.com/js/replay-embed.js
|
||||
/play.pokemonshowdown.com/js/client-main.js
|
||||
/play.pokemonshowdown.com/js/client-core.js
|
||||
/play.pokemonshowdown.com/js/client-connection.js
|
||||
|
||||
/pokemonshowdown.com/.well-known/
|
||||
/pokemonshowdown.com/.pages-cached/
|
||||
/pokemonshowdown.com/files/
|
||||
/pokemonshowdown.com/images/
|
||||
/pokemonshowdown.com/ads.txt
|
||||
|
||||
/replay.pokemonshowdown.com/index.php
|
||||
/replay.pokemonshowdown.com/js/
|
||||
|
|
|
|||
|
|
@ -8,18 +8,18 @@ const child_process = require("child_process");
|
|||
const rootDir = path.resolve(__dirname, '..');
|
||||
process.chdir(rootDir);
|
||||
|
||||
if (!fs.existsSync('data/pokemon-showdown')) {
|
||||
if (!fs.existsSync('caches/pokemon-showdown')) {
|
||||
child_process.execSync('git clone https://github.com/smogon/pokemon-showdown.git', {
|
||||
cwd: 'data',
|
||||
cwd: 'caches',
|
||||
});
|
||||
}
|
||||
|
||||
process.stdout.write("Syncing data from Git repository... ");
|
||||
child_process.execSync('git pull', {cwd: 'data/pokemon-showdown'});
|
||||
child_process.execSync('npm run build', {cwd: 'data/pokemon-showdown'});
|
||||
child_process.execSync('git pull', {cwd: 'caches/pokemon-showdown'});
|
||||
child_process.execSync('npm run build', {cwd: 'caches/pokemon-showdown'});
|
||||
console.log("DONE");
|
||||
|
||||
const Dex = require('../data/pokemon-showdown/dist/sim/dex').Dex;
|
||||
const Dex = require('../caches/pokemon-showdown/dist/sim/dex').Dex;
|
||||
const toID = Dex.toID;
|
||||
process.stdout.write("Loading gen 6 data... ");
|
||||
Dex.includeData();
|
||||
|
|
@ -300,7 +300,7 @@ function requireNoCache(pathSpec) {
|
|||
|
||||
buf += 'exports.BattleArticleTitles = ' + JSON.stringify(BattleArticleTitles) + ';\n\n';
|
||||
|
||||
fs.writeFileSync('data/search-index.js', buf);
|
||||
fs.writeFileSync('play.pokemonshowdown.com/data/search-index.js', buf);
|
||||
}
|
||||
|
||||
console.log("DONE");
|
||||
|
|
@ -1138,7 +1138,7 @@ process.stdout.write("Building `data/teambuilder-tables.js`... ");
|
|||
|
||||
buf += `exports.BattleTeambuilderTable = JSON.parse('${JSON.stringify(BattleTeambuilderTable).replace(/['\\]/g, "\\$&")}');\n\n`;
|
||||
|
||||
fs.writeFileSync('data/teambuilder-tables.js', buf);
|
||||
fs.writeFileSync('play.pokemonshowdown.com/data/teambuilder-tables.js', buf);
|
||||
}
|
||||
|
||||
console.log("DONE");
|
||||
|
|
@ -1150,7 +1150,7 @@ console.log("DONE");
|
|||
process.stdout.write("Building `data/pokedex.js`... ");
|
||||
|
||||
{
|
||||
const Pokedex = requireNoCache('../data/pokemon-showdown/dist/data/pokedex.js').Pokedex;
|
||||
const Pokedex = requireNoCache('../caches/pokemon-showdown/dist/data/pokedex.js').Pokedex;
|
||||
for (const id in Pokedex) {
|
||||
const entry = Pokedex[id];
|
||||
if (Dex.data.FormatsData[id]) {
|
||||
|
|
@ -1162,8 +1162,8 @@ process.stdout.write("Building `data/pokedex.js`... ");
|
|||
}
|
||||
}
|
||||
const buf = 'exports.BattlePokedex = ' + es3stringify(Pokedex) + ';';
|
||||
fs.writeFileSync('data/pokedex.js', buf);
|
||||
fs.writeFileSync('data/pokedex.json', JSON.stringify(Pokedex));
|
||||
fs.writeFileSync('play.pokemonshowdown.com/data/pokedex.js', buf);
|
||||
fs.writeFileSync('play.pokemonshowdown.com/data/pokedex.json', JSON.stringify(Pokedex));
|
||||
}
|
||||
|
||||
console.log("DONE");
|
||||
|
|
@ -1175,15 +1175,15 @@ console.log("DONE");
|
|||
process.stdout.write("Building `data/moves,items,abilities,typechart,learnsets.js`...");
|
||||
|
||||
{
|
||||
const Moves = requireNoCache('../data/pokemon-showdown/dist/data/moves.js').Moves;
|
||||
const Moves = requireNoCache('../caches/pokemon-showdown/dist/data/moves.js').Moves;
|
||||
for (const id in Moves) {
|
||||
const move = Dex.moves.get(Moves[id].name);
|
||||
if (move.desc) Moves[id].desc = move.desc;
|
||||
if (move.shortDesc) Moves[id].shortDesc = move.shortDesc;
|
||||
}
|
||||
const buf = 'exports.BattleMovedex = ' + es3stringify(Moves) + ';';
|
||||
fs.writeFileSync('data/moves.js', buf);
|
||||
fs.writeFileSync('data/moves.json', JSON.stringify(Moves));
|
||||
fs.writeFileSync('play.pokemonshowdown.com/data/moves.js', buf);
|
||||
fs.writeFileSync('play.pokemonshowdown.com/data/moves.json', JSON.stringify(Moves));
|
||||
}
|
||||
|
||||
/*********************************************************
|
||||
|
|
@ -1191,14 +1191,14 @@ process.stdout.write("Building `data/moves,items,abilities,typechart,learnsets.j
|
|||
*********************************************************/
|
||||
|
||||
{
|
||||
const Items = requireNoCache('../data/pokemon-showdown/dist/data/items.js').Items;
|
||||
const Items = requireNoCache('../caches/pokemon-showdown/dist/data/items.js').Items;
|
||||
for (const id in Items) {
|
||||
const item = Dex.items.get(Items[id].name);
|
||||
if (item.desc) Items[id].desc = item.desc;
|
||||
if (item.shortDesc) Items[id].shortDesc = item.shortDesc;
|
||||
}
|
||||
const buf = 'exports.BattleItems = ' + es3stringify(Items) + ';';
|
||||
fs.writeFileSync('data/items.js', buf);
|
||||
fs.writeFileSync('play.pokemonshowdown.com/data/items.js', buf);
|
||||
}
|
||||
|
||||
/*********************************************************
|
||||
|
|
@ -1206,14 +1206,14 @@ process.stdout.write("Building `data/moves,items,abilities,typechart,learnsets.j
|
|||
*********************************************************/
|
||||
|
||||
{
|
||||
const Abilities = requireNoCache('../data/pokemon-showdown/dist/data/abilities.js').Abilities;
|
||||
const Abilities = requireNoCache('../caches/pokemon-showdown/dist/data/abilities.js').Abilities;
|
||||
for (const id in Abilities) {
|
||||
const ability = Dex.abilities.get(Abilities[id].name);
|
||||
if (ability.desc) Abilities[id].desc = ability.desc;
|
||||
if (ability.shortDesc) Abilities[id].shortDesc = ability.shortDesc;
|
||||
}
|
||||
const buf = 'exports.BattleAbilities = ' + es3stringify(Abilities) + ';';
|
||||
fs.writeFileSync('data/abilities.js', buf);
|
||||
fs.writeFileSync('play.pokemonshowdown.com/data/abilities.js', buf);
|
||||
}
|
||||
|
||||
/*********************************************************
|
||||
|
|
@ -1221,9 +1221,9 @@ process.stdout.write("Building `data/moves,items,abilities,typechart,learnsets.j
|
|||
*********************************************************/
|
||||
|
||||
{
|
||||
const TypeChart = requireNoCache('../data/pokemon-showdown/dist/data/typechart.js').TypeChart;
|
||||
const TypeChart = requireNoCache('../caches/pokemon-showdown/dist/data/typechart.js').TypeChart;
|
||||
const buf = 'exports.BattleTypeChart = ' + es3stringify(TypeChart) + ';';
|
||||
fs.writeFileSync('data/typechart.js', buf);
|
||||
fs.writeFileSync('play.pokemonshowdown.com/data/typechart.js', buf);
|
||||
}
|
||||
|
||||
/*********************************************************
|
||||
|
|
@ -1231,9 +1231,9 @@ process.stdout.write("Building `data/moves,items,abilities,typechart,learnsets.j
|
|||
*********************************************************/
|
||||
|
||||
{
|
||||
const Aliases = requireNoCache('../data/pokemon-showdown/dist/data/aliases.js').Aliases;
|
||||
const Aliases = requireNoCache('../caches/pokemon-showdown/dist/data/aliases.js').Aliases;
|
||||
const buf = 'exports.BattleAliases = ' + es3stringify(Aliases) + ';';
|
||||
fs.writeFileSync('data/aliases.js', buf);
|
||||
fs.writeFileSync('play.pokemonshowdown.com/data/aliases.js', buf);
|
||||
}
|
||||
|
||||
/*********************************************************
|
||||
|
|
@ -1241,9 +1241,9 @@ process.stdout.write("Building `data/moves,items,abilities,typechart,learnsets.j
|
|||
*********************************************************/
|
||||
|
||||
{
|
||||
const FormatsData = requireNoCache('../data/pokemon-showdown/dist/data/formats-data.js').FormatsData;
|
||||
const FormatsData = requireNoCache('../caches/pokemon-showdown/dist/data/formats-data.js').FormatsData;
|
||||
const buf = 'exports.BattleFormatsData = ' + es3stringify(FormatsData) + ';';
|
||||
fs.writeFileSync('data/formats-data.js', buf);
|
||||
fs.writeFileSync('play.pokemonshowdown.com/data/formats-data.js', buf);
|
||||
}
|
||||
|
||||
/*********************************************************
|
||||
|
|
@ -1251,9 +1251,9 @@ process.stdout.write("Building `data/moves,items,abilities,typechart,learnsets.j
|
|||
*********************************************************/
|
||||
|
||||
{
|
||||
const Formats = requireNoCache('../data/pokemon-showdown/dist/config/formats.js').Formats;
|
||||
const Formats = requireNoCache('../caches/pokemon-showdown/dist/config/formats.js').Formats;
|
||||
const buf = 'exports.Formats = ' + es3stringify(Formats) + ';';
|
||||
fs.writeFileSync('data/formats.js', buf);
|
||||
fs.writeFileSync('play.pokemonshowdown.com/data/formats.js', buf);
|
||||
}
|
||||
|
||||
/*********************************************************
|
||||
|
|
@ -1261,10 +1261,10 @@ process.stdout.write("Building `data/moves,items,abilities,typechart,learnsets.j
|
|||
*********************************************************/
|
||||
|
||||
{
|
||||
const Learnsets = requireNoCache('../data/pokemon-showdown/dist/data/learnsets.js').Learnsets;
|
||||
const Learnsets = requireNoCache('../caches/pokemon-showdown/dist/data/learnsets.js').Learnsets;
|
||||
const buf = 'exports.BattleLearnsets = ' + es3stringify(Learnsets) + ';';
|
||||
fs.writeFileSync('data/learnsets.js', buf);
|
||||
fs.writeFileSync('data/learnsets.json', JSON.stringify(Learnsets));
|
||||
fs.writeFileSync('play.pokemonshowdown.com/data/learnsets.js', buf);
|
||||
fs.writeFileSync('play.pokemonshowdown.com/data/learnsets.json', JSON.stringify(Learnsets));
|
||||
}
|
||||
|
||||
/*********************************************************
|
||||
|
|
@ -1295,7 +1295,7 @@ process.stdout.write("Building `data/moves,items,abilities,typechart,learnsets.j
|
|||
for (const id in textData.Items) assignData(id, textData.Items[id]);
|
||||
|
||||
const buf = 'exports.BattleText = ' + es3stringify(Text) + ';';
|
||||
fs.writeFileSync('data/text.js', buf);
|
||||
fs.writeFileSync('play.pokemonshowdown.com/data/text.js', buf);
|
||||
}
|
||||
|
||||
console.log("DONE");
|
||||
|
|
|
|||
|
|
@ -16,9 +16,9 @@ const fs = require('fs');
|
|||
|
||||
const thisFile = __filename;
|
||||
const thisDir = __dirname;
|
||||
const rootDir = path.resolve(thisDir, '..');
|
||||
const rootDir = path.resolve(thisDir, '../play.pokemonshowdown.com');
|
||||
|
||||
const Dex = require('../data/pokemon-showdown/dist/sim/dex').Dex;
|
||||
const Dex = require('../caches/pokemon-showdown/dist/sim/dex').Dex;
|
||||
const toID = Dex.toID;
|
||||
|
||||
function updateLearnsets(callback) {
|
||||
|
|
|
|||
|
|
@ -3,10 +3,10 @@
|
|||
|
||||
const fs = require("fs");
|
||||
const path = require("path");
|
||||
process.chdir(path.resolve(__dirname, '..'));
|
||||
process.chdir(path.resolve(__dirname, '../play.pokemonshowdown.com'));
|
||||
const imageSize = require('image-size');
|
||||
|
||||
const Dex = require('./../data/pokemon-showdown/dist/sim/dex').Dex;
|
||||
const Dex = require('./../caches/pokemon-showdown/dist/sim/dex').Dex;
|
||||
const toID = Dex.toID;
|
||||
|
||||
process.stdout.write("Updating animated sprite dimensions... ");
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<?php
|
||||
date_default_timezone_set('America/Los_Angeles');
|
||||
include __DIR__.'/../website/news/include.php';
|
||||
include __DIR__.'/../pokemonshowdown.com/news/include.php';
|
||||
|
||||
echo json_encode(array(getNewsId(), renderNews()));
|
||||
|
|
|
|||
|
|
@ -77,41 +77,49 @@ process.stdout.write("Compiling TS files... ");
|
|||
let compileStartTime = process.hrtime();
|
||||
let compiledFiles = 0;
|
||||
|
||||
// Babel can't find babelrc if we try to compile stuff in data/pokemon-showdown/ fsr
|
||||
// Babel can't find babelrc if we try to compile stuff in caches/pokemon-showdown/ fsr
|
||||
let compileOpts = Object.assign(eval('(' + fs.readFileSync('.babelrc') + ')'), {
|
||||
babelrc: false,
|
||||
incremental: true,
|
||||
ignore: ['src/battle-animations.js', 'src/battle-animations-moves.js'],
|
||||
ignore: ['play.pokemonshowdown.com/src/battle-animations.js', 'play.pokemonshowdown.com/src/battle-animations-moves.js'],
|
||||
});
|
||||
if (process.argv[2] === 'full') {
|
||||
delete compileOpts.ignore;
|
||||
compiler.compileToDir(
|
||||
['data/pokemon-showdown/server/chat-formatter.ts'],
|
||||
'js/server/',
|
||||
['caches/pokemon-showdown/server/chat-formatter.ts'],
|
||||
'play.pokemonshowdown.com/js/server/',
|
||||
compileOpts
|
||||
);
|
||||
} else {
|
||||
try {
|
||||
fs.statSync('data/graphics.js');
|
||||
fs.statSync('play.pokemonshowdown.com/data/graphics.js');
|
||||
// graphics.js exists, recompile it
|
||||
delete compileOpts.ignore;
|
||||
} catch (e) {}
|
||||
}
|
||||
|
||||
compiledFiles += compiler.compileToDir(`src`, `js`, compileOpts);
|
||||
compiledFiles += compiler.compileToDir(`play.pokemonshowdown.com/src`, `play.pokemonshowdown.com/js`, compileOpts);
|
||||
|
||||
compiledFiles += compiler.compileToDir(`replay.pokemonshowdown.com/src`, `replay.pokemonshowdown.com/js`, compileOpts);
|
||||
|
||||
compiledFiles += compiler.compileToFile(
|
||||
['src/battle-dex.ts', 'src/battle-dex-data.ts', 'src/battle-log.ts', 'src/battle-log-misc.js', 'data/pokemon-showdown/server/chat-formatter.ts', 'data/text.js', 'src/battle-text-parser.ts'],
|
||||
'js/battledata.js',
|
||||
[
|
||||
'play.pokemonshowdown.com/src/battle-dex.ts',
|
||||
'play.pokemonshowdown.com/src/battle-dex-data.ts',
|
||||
'play.pokemonshowdown.com/src/battle-log.ts',
|
||||
'play.pokemonshowdown.com/src/battle-log-misc.js',
|
||||
'caches/pokemon-showdown/server/chat-formatter.ts',
|
||||
'play.pokemonshowdown.com/data/text.js',
|
||||
'play.pokemonshowdown.com/src/battle-text-parser.ts',
|
||||
],
|
||||
'play.pokemonshowdown.com/js/battledata.js',
|
||||
compileOpts
|
||||
);
|
||||
|
||||
if (!compileOpts.ignore) {
|
||||
compiledFiles += compiler.compileToFile(
|
||||
['src/battle-animations.ts', 'src/battle-animations-moves.ts'],
|
||||
'data/graphics.js',
|
||||
['play.pokemonshowdown.com/src/battle-animations.ts', 'play.pokemonshowdown.com/src/battle-animations-moves.ts'],
|
||||
'play.pokemonshowdown.com/data/graphics.js',
|
||||
compileOpts
|
||||
);
|
||||
}
|
||||
|
|
@ -161,10 +169,10 @@ function updateURL(a, b, c, d) {
|
|||
}
|
||||
|
||||
function writeFiles(indexContents, preactIndexContents, crossprotocolContents, replayEmbedContents) {
|
||||
fs.writeFileSync('index.html', indexContents);
|
||||
fs.writeFileSync('preactalpha.html', preactIndexContents);
|
||||
fs.writeFileSync('crossprotocol.html', crossprotocolContents);
|
||||
fs.writeFileSync('js/replay-embed.js', replayEmbedContents);
|
||||
fs.writeFileSync('play.pokemonshowdown.com/index.html', indexContents);
|
||||
fs.writeFileSync('play.pokemonshowdown.com/preactalpha.html', preactIndexContents);
|
||||
fs.writeFileSync('play.pokemonshowdown.com/crossprotocol.html', crossprotocolContents);
|
||||
fs.writeFileSync('play.pokemonshowdown.com/js/replay-embed.js', replayEmbedContents);
|
||||
|
||||
let replaysContents = fs.readFileSync('replay.pokemonshowdown.com/index.template.php', {encoding: 'utf8'});
|
||||
replaysContents = replaysContents.replace(URL_REGEX, updateURL);
|
||||
|
|
@ -175,13 +183,13 @@ function writeFiles(indexContents, preactIndexContents, crossprotocolContents, r
|
|||
|
||||
function updateFiles() {
|
||||
// add hashes to js and css files and rewrite URLs
|
||||
let indexContents = fs.readFileSync('index.template.html', {encoding: 'utf8'});
|
||||
let indexContents = fs.readFileSync('play.pokemonshowdown.com/index.template.html', {encoding: 'utf8'});
|
||||
indexContents = indexContents.replace(URL_REGEX, updateURL);
|
||||
let preactIndexContents = fs.readFileSync('preactalpha.template.html', {encoding: 'utf8'});
|
||||
let preactIndexContents = fs.readFileSync('play.pokemonshowdown.com/preactalpha.template.html', {encoding: 'utf8'});
|
||||
preactIndexContents = preactIndexContents.replace(URL_REGEX, updateURL);
|
||||
let crossprotocolContents = fs.readFileSync('crossprotocol.template.html', {encoding: 'utf8'});
|
||||
let crossprotocolContents = fs.readFileSync('play.pokemonshowdown.com/crossprotocol.template.html', {encoding: 'utf8'});
|
||||
crossprotocolContents = crossprotocolContents.replace(URL_REGEX, updateURL);
|
||||
let replayEmbedContents = fs.readFileSync('js/replay-embed.template.js', {encoding: 'utf8'});
|
||||
let replayEmbedContents = fs.readFileSync('play.pokemonshowdown.com/js/replay-embed.template.js', {encoding: 'utf8'});
|
||||
replayEmbedContents = replayEmbedContents.replace(/play\.pokemonshowdown\.com/g, routes.client);
|
||||
|
||||
// add news, only if it's actually likely to exist
|
||||
|
|
|
|||
9
caches/README.md
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
Caches
|
||||
======
|
||||
|
||||
This directory is for caches. Everything here should be safe to delete.
|
||||
|
||||
Things cached here:
|
||||
|
||||
- `pokemon-showdown` a checkout of the server repo, used in the build process (mostly for stuff in `play.pokemonshowdown.com/data/`)
|
||||
- `eslint-*.json` eslint cache files
|
||||
|
|
@ -9,7 +9,7 @@
|
|||
"url": "https://github.com/Zarel/Pokemon-Showdown-Client.git"
|
||||
},
|
||||
"scripts": {
|
||||
"lint": "eslint --config=.eslintrc.js --cache --cache-file=eslint-cache/base js/ && eslint --config=build-tools/.eslintrc.js --cache --cache-file=eslint-cache/build build-tools/update build-tools/build-indexes && tslint --project .",
|
||||
"lint": "eslint --config=.eslintrc.js --cache --cache-file=caches/eslint-base.json play.pokemonshowdown.com/js/ && eslint --config=build-tools/.eslintrc.js --cache --cache-file=caches/eslint-build.json build-tools/update build-tools/build-indexes && tslint --project .",
|
||||
"test": "npm run lint && tsc && node build && mocha test/*.js",
|
||||
"fix": "eslint --config=.eslintrc.js --fix js/ && eslint --config=build-tools/.eslintrc.js --fix build-tools/update build-tools/build-indexes",
|
||||
"build": "node build",
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 40 KiB After Width: | Height: | Size: 40 KiB |
1
play.pokemonshowdown.com/config/colors.json
Symbolic link
|
|
@ -0,0 +1 @@
|
|||
../../config/colors.json
|
||||
1
play.pokemonshowdown.com/config/config.js
Symbolic link
|
|
@ -0,0 +1 @@
|
|||
../../config/config.js
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
$config = array();
|
||||
|
||||
require_once __DIR__ . '/config/config.inc.php';
|
||||
require_once __DIR__ . '/../config/config.inc.php';
|
||||
|
||||
$host = strtolower(strval(@$_REQUEST['host']));
|
||||
if (preg_match('/^([a-z0-9-_\.]*?)\.psim\.us$/', $host, $m)) {
|
||||
|
|
@ -19,7 +19,7 @@ $portType = ($protocol === 'http:' ? 'port' : 'httpsport');
|
|||
if ($protocol === 'https:') $config['https'] = true;
|
||||
|
||||
if ($config['host'] !== 'showdown') {
|
||||
include_once __DIR__ . '/config/servers.inc.php';
|
||||
include_once __DIR__ . '/../config/servers.inc.php';
|
||||
|
||||
$hyphenpos = strrpos($config['host'], '-');
|
||||
if ($hyphenpos) {
|
||||
|
Before Width: | Height: | Size: 3.0 KiB After Width: | Height: | Size: 3.0 KiB |
|
Before Width: | Height: | Size: 39 KiB After Width: | Height: | Size: 39 KiB |
|
Before Width: | Height: | Size: 4.5 KiB After Width: | Height: | Size: 4.5 KiB |
|
Before Width: | Height: | Size: 36 KiB After Width: | Height: | Size: 36 KiB |
|
Before Width: | Height: | Size: 41 KiB After Width: | Height: | Size: 41 KiB |
|
Before Width: | Height: | Size: 6.9 KiB After Width: | Height: | Size: 6.9 KiB |
|
Before Width: | Height: | Size: 328 B After Width: | Height: | Size: 328 B |
|
Before Width: | Height: | Size: 6.5 KiB After Width: | Height: | Size: 6.5 KiB |
|
Before Width: | Height: | Size: 5.2 KiB After Width: | Height: | Size: 5.2 KiB |
|
Before Width: | Height: | Size: 5.8 KiB After Width: | Height: | Size: 5.8 KiB |
|
Before Width: | Height: | Size: 6.9 KiB After Width: | Height: | Size: 6.9 KiB |
|
Before Width: | Height: | Size: 5.7 KiB After Width: | Height: | Size: 5.7 KiB |
|
Before Width: | Height: | Size: 6.3 KiB After Width: | Height: | Size: 6.3 KiB |
|
Before Width: | Height: | Size: 7.0 KiB After Width: | Height: | Size: 7.0 KiB |
|
Before Width: | Height: | Size: 7.9 KiB After Width: | Height: | Size: 7.9 KiB |
|
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 1.0 KiB |
|
Before Width: | Height: | Size: 9.4 KiB After Width: | Height: | Size: 9.4 KiB |
|
Before Width: | Height: | Size: 9.3 KiB After Width: | Height: | Size: 9.3 KiB |
|
Before Width: | Height: | Size: 7.5 KiB After Width: | Height: | Size: 7.5 KiB |
|
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 2.8 KiB |
|
Before Width: | Height: | Size: 3.1 KiB After Width: | Height: | Size: 3.1 KiB |
|
Before Width: | Height: | Size: 4.8 KiB After Width: | Height: | Size: 4.8 KiB |
|
Before Width: | Height: | Size: 7.4 KiB After Width: | Height: | Size: 7.4 KiB |
|
Before Width: | Height: | Size: 52 KiB After Width: | Height: | Size: 52 KiB |
|
Before Width: | Height: | Size: 4.7 KiB After Width: | Height: | Size: 4.7 KiB |
|
Before Width: | Height: | Size: 29 KiB After Width: | Height: | Size: 29 KiB |
|
Before Width: | Height: | Size: 32 KiB After Width: | Height: | Size: 32 KiB |
|
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 18 KiB |
|
Before Width: | Height: | Size: 65 KiB After Width: | Height: | Size: 65 KiB |
|
Before Width: | Height: | Size: 32 KiB After Width: | Height: | Size: 32 KiB |
|
Before Width: | Height: | Size: 45 KiB After Width: | Height: | Size: 45 KiB |
|
Before Width: | Height: | Size: 8.4 KiB After Width: | Height: | Size: 8.4 KiB |
|
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 10 KiB |
|
Before Width: | Height: | Size: 8.4 KiB After Width: | Height: | Size: 8.4 KiB |
|
Before Width: | Height: | Size: 8.3 KiB After Width: | Height: | Size: 8.3 KiB |
|
Before Width: | Height: | Size: 9.3 KiB After Width: | Height: | Size: 9.3 KiB |
|
Before Width: | Height: | Size: 260 KiB After Width: | Height: | Size: 260 KiB |
|
Before Width: | Height: | Size: 110 KiB After Width: | Height: | Size: 110 KiB |
|
Before Width: | Height: | Size: 7.9 KiB After Width: | Height: | Size: 7.9 KiB |
|
Before Width: | Height: | Size: 8.4 KiB After Width: | Height: | Size: 8.4 KiB |
|
Before Width: | Height: | Size: 8.3 KiB After Width: | Height: | Size: 8.3 KiB |
|
Before Width: | Height: | Size: 60 KiB After Width: | Height: | Size: 60 KiB |
|
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 20 KiB |
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 197 B After Width: | Height: | Size: 197 B |
|
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 17 KiB |
|
Before Width: | Height: | Size: 181 KiB After Width: | Height: | Size: 181 KiB |
|
Before Width: | Height: | Size: 291 KiB After Width: | Height: | Size: 291 KiB |
|
Before Width: | Height: | Size: 106 KiB After Width: | Height: | Size: 106 KiB |
|
Before Width: | Height: | Size: 150 KiB After Width: | Height: | Size: 150 KiB |
|
Before Width: | Height: | Size: 215 KiB After Width: | Height: | Size: 215 KiB |
|
Before Width: | Height: | Size: 169 KiB After Width: | Height: | Size: 169 KiB |
|
Before Width: | Height: | Size: 106 KiB After Width: | Height: | Size: 106 KiB |
|
Before Width: | Height: | Size: 131 KiB After Width: | Height: | Size: 131 KiB |
|
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 362 B After Width: | Height: | Size: 362 B |
|
Before Width: | Height: | Size: 7.3 KiB After Width: | Height: | Size: 7.3 KiB |
|
Before Width: | Height: | Size: 3.6 KiB After Width: | Height: | Size: 3.6 KiB |
|
Before Width: | Height: | Size: 433 B After Width: | Height: | Size: 433 B |
|
Before Width: | Height: | Size: 433 B After Width: | Height: | Size: 433 B |
|
Before Width: | Height: | Size: 2.4 KiB After Width: | Height: | Size: 2.4 KiB |
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB |
|
Before Width: | Height: | Size: 8.4 KiB After Width: | Height: | Size: 8.4 KiB |
|
Before Width: | Height: | Size: 3.2 KiB After Width: | Height: | Size: 3.2 KiB |
|
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 18 KiB |
|
Before Width: | Height: | Size: 125 B After Width: | Height: | Size: 125 B |
|
Before Width: | Height: | Size: 136 B After Width: | Height: | Size: 136 B |
|
Before Width: | Height: | Size: 4.4 KiB After Width: | Height: | Size: 4.4 KiB |
|
Before Width: | Height: | Size: 4.1 KiB After Width: | Height: | Size: 4.1 KiB |
|
Before Width: | Height: | Size: 481 KiB After Width: | Height: | Size: 481 KiB |
|
Before Width: | Height: | Size: 137 B After Width: | Height: | Size: 137 B |
|
Before Width: | Height: | Size: 244 B After Width: | Height: | Size: 244 B |
|
Before Width: | Height: | Size: 292 B After Width: | Height: | Size: 292 B |
|
Before Width: | Height: | Size: 335 B After Width: | Height: | Size: 335 B |
|
Before Width: | Height: | Size: 375 B After Width: | Height: | Size: 375 B |
|
Before Width: | Height: | Size: 417 B After Width: | Height: | Size: 417 B |
|
Before Width: | Height: | Size: 415 B After Width: | Height: | Size: 415 B |