lol-constants 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,7 @@
1
+ export declare const DDPaths: {
2
+ CHAMPION_ICON_BASE: string;
3
+ SPELL_ICON_BASE: string;
4
+ PROFILE_ICON_BASE: string;
5
+ ITEM_ICON_BASE: string;
6
+ RUNE_ICON_BASE: string;
7
+ };
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.DDPaths = void 0;
4
+ const VERSION = '12.8.1';
5
+ const BASE = `http://ddragon.leagueoflegends.com/cdn/${VERSION}/`;
6
+ exports.DDPaths = {
7
+ CHAMPION_ICON_BASE: `${BASE}img/champion/`,
8
+ SPELL_ICON_BASE: `${BASE}img/spell/`,
9
+ PROFILE_ICON_BASE: `${BASE}img/profileicon/`,
10
+ ITEM_ICON_BASE: `${BASE}img/item/`,
11
+ RUNE_ICON_BASE: `./public/pics/league/`,
12
+ };
@@ -0,0 +1 @@
1
+ export declare function generateChampionsByKey(): void;
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.generateChampionsByKey = void 0;
7
+ const fs_1 = __importDefault(require("fs"));
8
+ const champion_json_1 = __importDefault(require("../assets/champion.json"));
9
+ function generateChampionsByKey() {
10
+ const championsByKey = {
11
+ data: {},
12
+ version: '',
13
+ };
14
+ let championId;
15
+ for (championId in champion_json_1.default.data) {
16
+ const championData = champion_json_1.default.data[championId];
17
+ championsByKey.data[championData.key] = championData;
18
+ }
19
+ championsByKey.version = champion_json_1.default.version;
20
+ fs_1.default.writeFileSync(`src/generated/championByKey.json`, JSON.stringify(championsByKey));
21
+ }
22
+ exports.generateChampionsByKey = generateChampionsByKey;
@@ -0,0 +1 @@
1
+ export declare function generateChampionsByName(): void;
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.generateChampionsByName = void 0;
7
+ const fs_1 = __importDefault(require("fs"));
8
+ const champion_json_1 = __importDefault(require("../assets/champion.json"));
9
+ function generateChampionsByName() {
10
+ const championsByName = {
11
+ data: {},
12
+ version: '',
13
+ };
14
+ let championId;
15
+ for (championId in champion_json_1.default.data) {
16
+ const championData = champion_json_1.default.data[championId];
17
+ championsByName.data[championData.name] = championData;
18
+ }
19
+ championsByName.version = champion_json_1.default.version;
20
+ fs_1.default.writeFileSync(`src/generated/championByName.json`, JSON.stringify(championsByName));
21
+ }
22
+ exports.generateChampionsByName = generateChampionsByName;