lol-constants 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/Constants/DDPaths.d.ts +7 -0
- package/dist/Constants/DDPaths.js +12 -0
- package/dist/Helpers/generateChampionsByKey.d.ts +1 -0
- package/dist/Helpers/generateChampionsByKey.js +22 -0
- package/dist/Helpers/generateChampionsByName.d.ts +1 -0
- package/dist/Helpers/generateChampionsByName.js +22 -0
- package/dist/assets/champion.json +1 -0
- package/dist/assets/item.json +1 -0
- package/dist/assets/runesReforged.json +1 -0
- package/dist/assets/summoner.json +1 -0
- package/dist/generated/championByKey.json +1 -0
- package/dist/generated/championByName.json +1 -0
- package/dist/index.d.ts +32137 -0
- package/dist/index.js +20 -0
- package/dist/scripts/generate-all.d.ts +1 -0
- package/dist/scripts/generate-all.js +9 -0
- package/package.json +21 -0
@@ -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;
|