lol-constants 0.2.1 → 0.5.0
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/Helpers/generateItemsByName.d.ts +1 -0
- package/dist/Helpers/generateItemsByName.js +25 -0
- package/dist/assets/champion.json +1 -1
- package/dist/assets/item.json +1 -1
- package/dist/assets/runesReforged.json +1 -1
- package/dist/assets/summoner.json +1 -1
- package/dist/generated/championByKey.json +1 -1
- package/dist/generated/championByName.json +1 -1
- package/dist/generated/itemByKey.json +1 -0
- package/dist/index.d.ts +141 -0
- package/dist/scripts/generate-all.js +2 -0
- package/dist/types/Meta.d.ts +1 -1
- package/dist/types/index.d.ts +5 -1
- package/package.json +6 -6
@@ -0,0 +1 @@
|
|
1
|
+
export declare function generateItemsByName(): void;
|
@@ -0,0 +1,25 @@
|
|
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.generateItemsByName = void 0;
|
7
|
+
const fs_1 = __importDefault(require("fs"));
|
8
|
+
const item_json_1 = __importDefault(require("../assets/item.json"));
|
9
|
+
function generateItemsByName() {
|
10
|
+
const itemsByKey = {
|
11
|
+
data: {},
|
12
|
+
version: '',
|
13
|
+
};
|
14
|
+
let itemKey;
|
15
|
+
for (itemKey in item_json_1.default.data) {
|
16
|
+
const itemData = item_json_1.default.data[itemKey];
|
17
|
+
itemsByKey.data[itemData.name] = {
|
18
|
+
...itemData,
|
19
|
+
key: itemKey,
|
20
|
+
};
|
21
|
+
}
|
22
|
+
itemsByKey.version = item_json_1.default.version;
|
23
|
+
fs_1.default.writeFileSync(`src/generated/itemByKey.json`, JSON.stringify(itemsByKey));
|
24
|
+
}
|
25
|
+
exports.generateItemsByName = generateItemsByName;
|