lol-constants 0.9.2 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (197) hide show
  1. package/dist/Constants/ChampionIds.d.ts +162 -0
  2. package/dist/Constants/ChampionIds.js +4 -0
  3. package/dist/Constants/ChampionIdsByName.d.ts +162 -0
  4. package/dist/Constants/ChampionIdsByName.js +4 -0
  5. package/dist/Constants/ChampionKeys.d.ts +162 -2
  6. package/dist/Constants/ChampionKeys.js +1 -5
  7. package/dist/Constants/ChampionNames.d.ts +162 -2
  8. package/dist/Constants/ChampionNames.js +1 -5
  9. package/dist/Constants/DDPaths.d.ts +27 -5
  10. package/dist/Constants/DDPaths.js +29 -7
  11. package/dist/Constants/ItemKeys.d.ts +250 -2
  12. package/dist/Constants/ItemKeys.js +1 -5
  13. package/dist/Constants/ItemNames.d.ts +256 -2
  14. package/dist/Constants/ItemNames.js +1 -5
  15. package/dist/Constants/RuneIds.d.ts +74 -2
  16. package/dist/Constants/RuneIds.js +1 -9
  17. package/dist/Constants/RuneNames.d.ts +74 -2
  18. package/dist/Constants/RuneNames.js +1 -5
  19. package/dist/Constants/RuneSets.d.ts +77 -0
  20. package/dist/Constants/RuneSets.js +210 -0
  21. package/dist/Constants/SpellIds.d.ts +18 -0
  22. package/dist/Constants/SpellIds.js +4 -0
  23. package/dist/Constants/SpellIdsByName.d.ts +17 -0
  24. package/dist/Constants/SpellIdsByName.js +4 -0
  25. package/dist/Constants/SpellKeys.d.ts +18 -0
  26. package/dist/Constants/SpellKeys.js +4 -0
  27. package/dist/Constants/SpellNames.d.ts +18 -0
  28. package/dist/Constants/SpellNames.js +4 -0
  29. package/dist/Constants/StatRuneIds.d.ts +11 -2
  30. package/dist/Constants/StatRuneIds.js +1 -2
  31. package/dist/Constants/StatRuneNames.d.ts +11 -2
  32. package/dist/Constants/StatRuneNames.js +1 -2
  33. package/dist/Constants/TreeRuneIds.d.ts +65 -2
  34. package/dist/Constants/TreeRuneIds.js +1 -5
  35. package/dist/Constants/TreeRuneNames.d.ts +65 -2
  36. package/dist/Constants/TreeRuneNames.js +1 -5
  37. package/dist/Helpers/getChampionIdByKey.d.ts +2 -0
  38. package/dist/Helpers/getChampionIdByKey.js +8 -0
  39. package/dist/Helpers/getChampionIdByName.d.ts +2 -0
  40. package/dist/Helpers/getChampionIdByName.js +8 -0
  41. package/dist/Helpers/getChampionKeyById.d.ts +2 -0
  42. package/dist/Helpers/getChampionKeyById.js +8 -0
  43. package/dist/Helpers/getChampionKeyByName.js +3 -5
  44. package/dist/Helpers/getChampionNameById.d.ts +2 -0
  45. package/dist/Helpers/getChampionNameById.js +9 -0
  46. package/dist/Helpers/getChampionNameByKey.js +2 -5
  47. package/dist/Helpers/getItemKeyByName.js +2 -5
  48. package/dist/Helpers/getItemNameByKey.js +2 -5
  49. package/dist/Helpers/getRuneIdByName.js +2 -15
  50. package/dist/Helpers/getRuneNameById.js +2 -9
  51. package/dist/Helpers/getSpellIdByKey.d.ts +2 -0
  52. package/dist/Helpers/getSpellIdByKey.js +8 -0
  53. package/dist/Helpers/getSpellIdByName.d.ts +2 -0
  54. package/dist/Helpers/getSpellIdByName.js +8 -0
  55. package/dist/Helpers/getSpellKeyById.d.ts +2 -0
  56. package/dist/Helpers/getSpellKeyById.js +8 -0
  57. package/dist/Helpers/getSpellKeyByName.d.ts +2 -0
  58. package/dist/Helpers/getSpellKeyByName.js +9 -0
  59. package/dist/Helpers/getSpellNameById.d.ts +2 -0
  60. package/dist/Helpers/getSpellNameById.js +9 -0
  61. package/dist/Helpers/getSpellNameByKey.d.ts +2 -0
  62. package/dist/Helpers/getSpellNameByKey.js +8 -0
  63. package/dist/Helpers/getStatRuneIdByName.d.ts +2 -0
  64. package/dist/Helpers/getStatRuneIdByName.js +8 -0
  65. package/dist/Helpers/getStatRuneNameById.d.ts +2 -0
  66. package/dist/Helpers/getStatRuneNameById.js +8 -0
  67. package/dist/Helpers/getTreeRuneIdByName.d.ts +2 -0
  68. package/dist/Helpers/getTreeRuneIdByName.js +8 -0
  69. package/dist/Helpers/getTreeRuneNameById.d.ts +2 -0
  70. package/dist/Helpers/getTreeRuneNameById.js +8 -0
  71. package/dist/Helpers/isChampionId.d.ts +2 -0
  72. package/dist/Helpers/isChampionId.js +8 -0
  73. package/dist/Helpers/isChampionKey.d.ts +1 -1
  74. package/dist/Helpers/isChampionKey.js +2 -4
  75. package/dist/Helpers/isChampionName.d.ts +1 -1
  76. package/dist/Helpers/isChampionName.js +2 -4
  77. package/dist/Helpers/isItemKey.d.ts +1 -1
  78. package/dist/Helpers/isItemKey.js +2 -4
  79. package/dist/Helpers/isItemName.d.ts +1 -1
  80. package/dist/Helpers/isItemName.js +2 -4
  81. package/dist/Helpers/isRuneId.d.ts +1 -1
  82. package/dist/Helpers/isRuneId.js +2 -4
  83. package/dist/Helpers/isRuneName.d.ts +1 -1
  84. package/dist/Helpers/isRuneName.js +2 -4
  85. package/dist/Helpers/isSpellId.d.ts +2 -0
  86. package/dist/Helpers/isSpellId.js +8 -0
  87. package/dist/Helpers/isSpellKey.d.ts +2 -0
  88. package/dist/Helpers/isSpellKey.js +8 -0
  89. package/dist/Helpers/isSpellName.d.ts +2 -0
  90. package/dist/Helpers/isSpellName.js +8 -0
  91. package/dist/Helpers/isStatRuneId.d.ts +1 -1
  92. package/dist/Helpers/isStatRuneId.js +2 -4
  93. package/dist/Helpers/isStatRuneName.d.ts +1 -1
  94. package/dist/Helpers/isStatRuneName.js +2 -4
  95. package/dist/Helpers/isTreeRuneId.d.ts +1 -1
  96. package/dist/Helpers/isTreeRuneId.js +2 -4
  97. package/dist/Helpers/isTreeRuneName.d.ts +1 -1
  98. package/dist/Helpers/isTreeRuneName.js +2 -4
  99. package/dist/{Constants → assets}/StatRunes.d.ts +0 -0
  100. package/dist/{Constants → assets}/StatRunes.js +0 -0
  101. package/dist/assets/champion.json +1 -1
  102. package/dist/assets/index.d.ts +17216 -0
  103. package/dist/assets/index.js +17 -0
  104. package/dist/assets/item.json +1 -1
  105. package/dist/assets/runesReforged.json +1 -1
  106. package/dist/assets/summoner.json +1 -1
  107. package/dist/index.d.ts +25 -43394
  108. package/dist/index.js +80 -46
  109. package/dist/scripts/Helpers/getExportStatement.d.ts +6 -0
  110. package/dist/scripts/Helpers/getExportStatement.js +10 -0
  111. package/dist/scripts/generate-all.d.ts +16 -1
  112. package/dist/scripts/generate-all.js +16 -17
  113. package/dist/scripts/generate-champion-ids-by-name.d.ts +1 -0
  114. package/dist/{Helpers/generateChampionsByKey.js → scripts/generate-champion-ids-by-name.js} +9 -11
  115. package/dist/scripts/generate-champion-ids.d.ts +1 -0
  116. package/dist/{Helpers/generateChampionsByName.js → scripts/generate-champion-ids.js} +9 -11
  117. package/dist/scripts/generate-champion-keys.d.ts +1 -0
  118. package/dist/scripts/generate-champion-keys.js +20 -0
  119. package/dist/scripts/generate-champion-names.d.ts +1 -0
  120. package/dist/scripts/generate-champion-names.js +20 -0
  121. package/dist/scripts/generate-item-keys.d.ts +1 -0
  122. package/dist/scripts/generate-item-keys.js +21 -0
  123. package/dist/scripts/generate-item-names.d.ts +1 -0
  124. package/dist/scripts/generate-item-names.js +21 -0
  125. package/dist/scripts/generate-rune-ids.d.ts +1 -0
  126. package/dist/scripts/generate-rune-ids.js +29 -0
  127. package/dist/scripts/generate-rune-names.d.ts +1 -0
  128. package/dist/scripts/generate-rune-names.js +29 -0
  129. package/dist/scripts/generate-spell-ids-by-name.d.ts +1 -0
  130. package/dist/scripts/generate-spell-ids-by-name.js +20 -0
  131. package/dist/scripts/generate-spell-ids.d.ts +1 -0
  132. package/dist/scripts/generate-spell-ids.js +20 -0
  133. package/dist/scripts/generate-spell-keys.d.ts +1 -0
  134. package/dist/scripts/generate-spell-keys.js +20 -0
  135. package/dist/scripts/generate-spell-names.d.ts +1 -0
  136. package/dist/scripts/generate-spell-names.js +20 -0
  137. package/dist/scripts/generate-stat-rune-ids.d.ts +1 -0
  138. package/dist/scripts/generate-stat-rune-ids.js +20 -0
  139. package/dist/scripts/generate-stat-rune-names.d.ts +1 -0
  140. package/dist/scripts/generate-stat-rune-names.js +20 -0
  141. package/dist/scripts/generate-tree-rune-ids.d.ts +1 -0
  142. package/dist/{Helpers/generateRunesById.js → scripts/generate-tree-rune-ids.js} +9 -7
  143. package/dist/scripts/generate-tree-rune-names.d.ts +1 -0
  144. package/dist/{Helpers/generateRunesByName.js → scripts/generate-tree-rune-names.js} +9 -7
  145. package/dist/types/Meta.d.ts +32 -6
  146. package/dist/types/index.d.ts +164 -26
  147. package/package.json +2 -2
  148. package/dist/Constants/SummonerIds.d.ts +0 -2
  149. package/dist/Constants/SummonerIds.js +0 -8
  150. package/dist/Constants/SummonerKeys.d.ts +0 -2
  151. package/dist/Constants/SummonerKeys.js +0 -8
  152. package/dist/Constants/SummonerNames.d.ts +0 -2
  153. package/dist/Constants/SummonerNames.js +0 -8
  154. package/dist/Constants/SummonerSpellIds.d.ts +0 -2
  155. package/dist/Constants/SummonerSpellIds.js +0 -8
  156. package/dist/Constants/SummonerSpellKeys.d.ts +0 -2
  157. package/dist/Constants/SummonerSpellKeys.js +0 -8
  158. package/dist/Constants/SummonerSpellNames.d.ts +0 -2
  159. package/dist/Constants/SummonerSpellNames.js +0 -8
  160. package/dist/Helpers/generateChampionsByKey.d.ts +0 -1
  161. package/dist/Helpers/generateChampionsByName.d.ts +0 -1
  162. package/dist/Helpers/generateItemsByName.d.ts +0 -1
  163. package/dist/Helpers/generateItemsByName.js +0 -25
  164. package/dist/Helpers/generateRunesById.d.ts +0 -1
  165. package/dist/Helpers/generateRunesByName.d.ts +0 -1
  166. package/dist/Helpers/generateSummonerSpellsByKey.d.ts +0 -1
  167. package/dist/Helpers/generateSummonerSpellsByKey.js +0 -24
  168. package/dist/Helpers/generateSummonerSpellsByName.d.ts +0 -1
  169. package/dist/Helpers/generateSummonerSpellsByName.js +0 -24
  170. package/dist/Helpers/generateSummonersByKey.d.ts +0 -1
  171. package/dist/Helpers/generateSummonersByKey.js +0 -24
  172. package/dist/Helpers/generateSummonersByName.d.ts +0 -1
  173. package/dist/Helpers/generateSummonersByName.js +0 -24
  174. package/dist/Helpers/getSummonerSpellKeyByName.d.ts +0 -2
  175. package/dist/Helpers/getSummonerSpellKeyByName.js +0 -11
  176. package/dist/Helpers/getSummonerSpellNameByKey.d.ts +0 -2
  177. package/dist/Helpers/getSummonerSpellNameByKey.js +0 -11
  178. package/dist/Helpers/isSummonerId.d.ts +0 -2
  179. package/dist/Helpers/isSummonerId.js +0 -10
  180. package/dist/Helpers/isSummonerKey.d.ts +0 -2
  181. package/dist/Helpers/isSummonerKey.js +0 -10
  182. package/dist/Helpers/isSummonerName.d.ts +0 -2
  183. package/dist/Helpers/isSummonerName.js +0 -10
  184. package/dist/Helpers/isSummonerSpellId.d.ts +0 -2
  185. package/dist/Helpers/isSummonerSpellId.js +0 -10
  186. package/dist/Helpers/isSummonerSpellKey.d.ts +0 -2
  187. package/dist/Helpers/isSummonerSpellKey.js +0 -10
  188. package/dist/Helpers/isSummonerSpellName.d.ts +0 -2
  189. package/dist/Helpers/isSummonerSpellName.js +0 -10
  190. package/dist/generated/championByKey.json +0 -1
  191. package/dist/generated/championByName.json +0 -1
  192. package/dist/generated/itemByKey.json +0 -1
  193. package/dist/generated/itemByName.json +0 -1
  194. package/dist/generated/runesById.json +0 -1
  195. package/dist/generated/runesByName.json +0 -1
  196. package/dist/generated/summonerByKey.json +0 -1
  197. package/dist/generated/summonerByName.json +0 -1
package/dist/index.js CHANGED
@@ -1,4 +1,15 @@
1
1
  "use strict";
2
+ // # assets
3
+ // TEMP
4
+ // import _champion from './assets/champion.json'
5
+ // import _item from './assets/item.json'
6
+ // import _runesReforged from './assets/runesReforged.json'
7
+ // import _summoner from './assets/summoner.json'
8
+ // export const champion = _champion
9
+ // export const item = _item
10
+ // export const runesReforged = _runesReforged
11
+ // export const summoner = _summoner
12
+ // export { StatRunes } from './assets/StatRunes'
2
13
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
14
  if (k2 === undefined) k2 = k;
4
15
  var desc = Object.getOwnPropertyDescriptor(m, k);
@@ -13,19 +24,14 @@ var __createBinding = (this && this.__createBinding) || (Object.create ? (functi
13
24
  var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
25
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
26
  };
16
- var __importDefault = (this && this.__importDefault) || function (mod) {
17
- return (mod && mod.__esModule) ? mod : { "default": mod };
18
- };
19
27
  Object.defineProperty(exports, "__esModule", { value: true });
20
- exports.isTreeRuneName = exports.isTreeRuneId = exports.isSummonerSpellName = exports.isSummonerSpellKey = exports.isSummonerSpellId = exports.isStatRuneName = exports.isStatRuneId = exports.isRuneName = exports.isRuneId = exports.isItemName = exports.isItemKey = exports.isChampionName = exports.isChampionKey = exports.getSummonerSpellNameByKey = exports.getSummonerSpellKeyByName = exports.getRuneNameById = exports.getRuneIdByName = exports.getItemNameByKey = exports.getItemKeyByName = exports.getChampionNameByKey = exports.getChampionKeyByName = exports.summonerByName = exports.summonerByKey = exports.runesByName = exports.runesById = exports.itemByName = exports.championByName = exports.championByKey = exports.TreeRuneNames = exports.TreeRuneIds = exports.SummonerSpellNames = exports.SummonerSpellKeys = exports.SummonerSpellIds = exports.StatRunes = exports.StatRuneNames = exports.StatRuneIds = exports.RuneNames = exports.RuneIds = exports.ItemNames = exports.ItemKeys = exports.DDPaths = exports.ChampionNames = exports.ChampionKeys = exports.summoner = exports.runesReforged = exports.item = exports.champion = void 0;
21
- const champion_json_1 = __importDefault(require("./assets/champion.json"));
22
- const item_json_1 = __importDefault(require("./assets/item.json"));
23
- const runesReforged_json_1 = __importDefault(require("./assets/runesReforged.json"));
24
- const summoner_json_1 = __importDefault(require("./assets/summoner.json"));
25
- exports.champion = champion_json_1.default;
26
- exports.item = item_json_1.default;
27
- exports.runesReforged = runesReforged_json_1.default;
28
- exports.summoner = summoner_json_1.default;
28
+ exports.isTreeRuneId = exports.isStatRuneName = exports.isStatRuneId = exports.isSpellName = exports.isSpellKey = exports.isSpellId = exports.isRuneName = exports.isRuneId = exports.isItemName = exports.isItemKey = exports.isChampionName = exports.isChampionKey = exports.isChampionId = exports.getTreeRuneNameById = exports.getTreeRuneIdByName = exports.getStatRuneNameById = exports.getStatRuneIdByName = exports.getSpellNameByKey = exports.getSpellNameById = exports.getSpellKeyByName = exports.getSpellKeyById = exports.getSpellIdByName = exports.getSpellIdByKey = exports.getRuneNameById = exports.getRuneIdByName = exports.getItemNameByKey = exports.getItemKeyByName = exports.getChampionNameById = exports.getChampionKeyByName = exports.getChampionKeyById = exports.getChampionIdByName = exports.getChampionIdByKey = exports.TreeRuneNames = exports.TreeRuneIds = exports.StatRuneNames = exports.StatRuneIds = exports.SpellNames = exports.SpellKeys = exports.SpellIdsByName = exports.SpellIds = exports.RuneSets = exports.RuneNames = exports.RuneIds = exports.ItemNames = exports.ItemKeys = exports.DDPaths = exports.ChampionNames = exports.ChampionKeys = exports.ChampionIdsByName = exports.ChampionIds = void 0;
29
+ exports.isTreeRuneName = void 0;
30
+ // # Constants
31
+ var ChampionIds_1 = require("./Constants/ChampionIds");
32
+ Object.defineProperty(exports, "ChampionIds", { enumerable: true, get: function () { return ChampionIds_1.ChampionIds; } });
33
+ var ChampionIdsByName_1 = require("./Constants/ChampionIdsByName");
34
+ Object.defineProperty(exports, "ChampionIdsByName", { enumerable: true, get: function () { return ChampionIdsByName_1.ChampionIdsByName; } });
29
35
  var ChampionKeys_1 = require("./Constants/ChampionKeys");
30
36
  Object.defineProperty(exports, "ChampionKeys", { enumerable: true, get: function () { return ChampionKeys_1.ChampionKeys; } });
31
37
  var ChampionNames_1 = require("./Constants/ChampionNames");
@@ -40,77 +46,105 @@ var RuneIds_1 = require("./Constants/RuneIds");
40
46
  Object.defineProperty(exports, "RuneIds", { enumerable: true, get: function () { return RuneIds_1.RuneIds; } });
41
47
  var RuneNames_1 = require("./Constants/RuneNames");
42
48
  Object.defineProperty(exports, "RuneNames", { enumerable: true, get: function () { return RuneNames_1.RuneNames; } });
49
+ var RuneSets_1 = require("./Constants/RuneSets");
50
+ Object.defineProperty(exports, "RuneSets", { enumerable: true, get: function () { return RuneSets_1.RuneSets; } });
51
+ var SpellIds_1 = require("./Constants/SpellIds");
52
+ Object.defineProperty(exports, "SpellIds", { enumerable: true, get: function () { return SpellIds_1.SpellIds; } });
53
+ var SpellIdsByName_1 = require("./Constants/SpellIdsByName");
54
+ Object.defineProperty(exports, "SpellIdsByName", { enumerable: true, get: function () { return SpellIdsByName_1.SpellIdsByName; } });
55
+ var SpellKeys_1 = require("./Constants/SpellKeys");
56
+ Object.defineProperty(exports, "SpellKeys", { enumerable: true, get: function () { return SpellKeys_1.SpellKeys; } });
57
+ var SpellNames_1 = require("./Constants/SpellNames");
58
+ Object.defineProperty(exports, "SpellNames", { enumerable: true, get: function () { return SpellNames_1.SpellNames; } });
43
59
  var StatRuneIds_1 = require("./Constants/StatRuneIds");
44
60
  Object.defineProperty(exports, "StatRuneIds", { enumerable: true, get: function () { return StatRuneIds_1.StatRuneIds; } });
45
61
  var StatRuneNames_1 = require("./Constants/StatRuneNames");
46
62
  Object.defineProperty(exports, "StatRuneNames", { enumerable: true, get: function () { return StatRuneNames_1.StatRuneNames; } });
47
- var StatRunes_1 = require("./Constants/StatRunes");
48
- Object.defineProperty(exports, "StatRunes", { enumerable: true, get: function () { return StatRunes_1.StatRunes; } });
49
- var SummonerSpellIds_1 = require("./Constants/SummonerSpellIds");
50
- Object.defineProperty(exports, "SummonerSpellIds", { enumerable: true, get: function () { return SummonerSpellIds_1.SummonerSpellIds; } });
51
- var SummonerSpellKeys_1 = require("./Constants/SummonerSpellKeys");
52
- Object.defineProperty(exports, "SummonerSpellKeys", { enumerable: true, get: function () { return SummonerSpellKeys_1.SummonerSpellKeys; } });
53
- var SummonerSpellNames_1 = require("./Constants/SummonerSpellNames");
54
- Object.defineProperty(exports, "SummonerSpellNames", { enumerable: true, get: function () { return SummonerSpellNames_1.SummonerSpellNames; } });
55
63
  var TreeRuneIds_1 = require("./Constants/TreeRuneIds");
56
64
  Object.defineProperty(exports, "TreeRuneIds", { enumerable: true, get: function () { return TreeRuneIds_1.TreeRuneIds; } });
57
65
  var TreeRuneNames_1 = require("./Constants/TreeRuneNames");
58
66
  Object.defineProperty(exports, "TreeRuneNames", { enumerable: true, get: function () { return TreeRuneNames_1.TreeRuneNames; } });
59
- const championByKey_json_1 = __importDefault(require("./generated/championByKey.json"));
60
- const championByName_json_1 = __importDefault(require("./generated/championByName.json"));
61
- const itemByName_json_1 = __importDefault(require("./generated/itemByName.json"));
62
- const runesById_json_1 = __importDefault(require("./generated/runesById.json"));
63
- const runesByName_json_1 = __importDefault(require("./generated/runesByName.json"));
64
- const summonerByKey_json_1 = __importDefault(require("./generated/summonerByKey.json"));
65
- const summonerByName_json_1 = __importDefault(require("./generated/summonerByName.json"));
66
- exports.championByKey = championByKey_json_1.default;
67
- exports.championByName = championByName_json_1.default;
68
- exports.itemByName = itemByName_json_1.default;
69
- exports.runesById = runesById_json_1.default;
70
- exports.runesByName = runesByName_json_1.default;
71
- exports.summonerByKey = summonerByKey_json_1.default;
72
- exports.summonerByName = summonerByName_json_1.default;
67
+ // # Helpers
68
+ // ##
69
+ var getChampionIdByKey_1 = require("./Helpers/getChampionIdByKey");
70
+ Object.defineProperty(exports, "getChampionIdByKey", { enumerable: true, get: function () { return getChampionIdByKey_1.getChampionIdByKey; } });
71
+ var getChampionIdByName_1 = require("./Helpers/getChampionIdByName");
72
+ Object.defineProperty(exports, "getChampionIdByName", { enumerable: true, get: function () { return getChampionIdByName_1.getChampionIdByName; } });
73
+ var getChampionKeyById_1 = require("./Helpers/getChampionKeyById");
74
+ Object.defineProperty(exports, "getChampionKeyById", { enumerable: true, get: function () { return getChampionKeyById_1.getChampionKeyById; } });
73
75
  var getChampionKeyByName_1 = require("./Helpers/getChampionKeyByName");
74
76
  Object.defineProperty(exports, "getChampionKeyByName", { enumerable: true, get: function () { return getChampionKeyByName_1.getChampionKeyByName; } });
75
- var getChampionNameByKey_1 = require("./Helpers/getChampionNameByKey");
76
- Object.defineProperty(exports, "getChampionNameByKey", { enumerable: true, get: function () { return getChampionNameByKey_1.getChampionNameByKey; } });
77
+ var getChampionNameById_1 = require("./Helpers/getChampionNameById");
78
+ Object.defineProperty(exports, "getChampionNameById", { enumerable: true, get: function () { return getChampionNameById_1.getChampionNameById; } });
79
+ // ##
77
80
  var getItemKeyByName_1 = require("./Helpers/getItemKeyByName");
78
81
  Object.defineProperty(exports, "getItemKeyByName", { enumerable: true, get: function () { return getItemKeyByName_1.getItemKeyByName; } });
79
82
  var getItemNameByKey_1 = require("./Helpers/getItemNameByKey");
80
83
  Object.defineProperty(exports, "getItemNameByKey", { enumerable: true, get: function () { return getItemNameByKey_1.getItemNameByKey; } });
84
+ // ##
81
85
  var getRuneIdByName_1 = require("./Helpers/getRuneIdByName");
82
86
  Object.defineProperty(exports, "getRuneIdByName", { enumerable: true, get: function () { return getRuneIdByName_1.getRuneIdByName; } });
83
87
  var getRuneNameById_1 = require("./Helpers/getRuneNameById");
84
88
  Object.defineProperty(exports, "getRuneNameById", { enumerable: true, get: function () { return getRuneNameById_1.getRuneNameById; } });
85
- var getSummonerSpellKeyByName_1 = require("./Helpers/getSummonerSpellKeyByName");
86
- Object.defineProperty(exports, "getSummonerSpellKeyByName", { enumerable: true, get: function () { return getSummonerSpellKeyByName_1.getSummonerSpellKeyByName; } });
87
- var getSummonerSpellNameByKey_1 = require("./Helpers/getSummonerSpellNameByKey");
88
- Object.defineProperty(exports, "getSummonerSpellNameByKey", { enumerable: true, get: function () { return getSummonerSpellNameByKey_1.getSummonerSpellNameByKey; } });
89
+ // ##
90
+ var getSpellIdByKey_1 = require("./Helpers/getSpellIdByKey");
91
+ Object.defineProperty(exports, "getSpellIdByKey", { enumerable: true, get: function () { return getSpellIdByKey_1.getSpellIdByKey; } });
92
+ var getSpellIdByName_1 = require("./Helpers/getSpellIdByName");
93
+ Object.defineProperty(exports, "getSpellIdByName", { enumerable: true, get: function () { return getSpellIdByName_1.getSpellIdByName; } });
94
+ var getSpellKeyById_1 = require("./Helpers/getSpellKeyById");
95
+ Object.defineProperty(exports, "getSpellKeyById", { enumerable: true, get: function () { return getSpellKeyById_1.getSpellKeyById; } });
96
+ var getSpellKeyByName_1 = require("./Helpers/getSpellKeyByName");
97
+ Object.defineProperty(exports, "getSpellKeyByName", { enumerable: true, get: function () { return getSpellKeyByName_1.getSpellKeyByName; } });
98
+ var getSpellNameById_1 = require("./Helpers/getSpellNameById");
99
+ Object.defineProperty(exports, "getSpellNameById", { enumerable: true, get: function () { return getSpellNameById_1.getSpellNameById; } });
100
+ var getSpellNameByKey_1 = require("./Helpers/getSpellNameByKey");
101
+ Object.defineProperty(exports, "getSpellNameByKey", { enumerable: true, get: function () { return getSpellNameByKey_1.getSpellNameByKey; } });
102
+ // ##
103
+ var getStatRuneIdByName_1 = require("./Helpers/getStatRuneIdByName");
104
+ Object.defineProperty(exports, "getStatRuneIdByName", { enumerable: true, get: function () { return getStatRuneIdByName_1.getStatRuneIdByName; } });
105
+ var getStatRuneNameById_1 = require("./Helpers/getStatRuneNameById");
106
+ Object.defineProperty(exports, "getStatRuneNameById", { enumerable: true, get: function () { return getStatRuneNameById_1.getStatRuneNameById; } });
107
+ // ##
108
+ var getTreeRuneIdByName_1 = require("./Helpers/getTreeRuneIdByName");
109
+ Object.defineProperty(exports, "getTreeRuneIdByName", { enumerable: true, get: function () { return getTreeRuneIdByName_1.getTreeRuneIdByName; } });
110
+ var getTreeRuneNameById_1 = require("./Helpers/getTreeRuneNameById");
111
+ Object.defineProperty(exports, "getTreeRuneNameById", { enumerable: true, get: function () { return getTreeRuneNameById_1.getTreeRuneNameById; } });
112
+ // ##
113
+ var isChampionId_1 = require("./Helpers/isChampionId");
114
+ Object.defineProperty(exports, "isChampionId", { enumerable: true, get: function () { return isChampionId_1.isChampionId; } });
89
115
  var isChampionKey_1 = require("./Helpers/isChampionKey");
90
116
  Object.defineProperty(exports, "isChampionKey", { enumerable: true, get: function () { return isChampionKey_1.isChampionKey; } });
91
117
  var isChampionName_1 = require("./Helpers/isChampionName");
92
118
  Object.defineProperty(exports, "isChampionName", { enumerable: true, get: function () { return isChampionName_1.isChampionName; } });
119
+ // ##
93
120
  var isItemKey_1 = require("./Helpers/isItemKey");
94
121
  Object.defineProperty(exports, "isItemKey", { enumerable: true, get: function () { return isItemKey_1.isItemKey; } });
95
122
  var isItemName_1 = require("./Helpers/isItemName");
96
123
  Object.defineProperty(exports, "isItemName", { enumerable: true, get: function () { return isItemName_1.isItemName; } });
124
+ // ##
97
125
  var isRuneId_1 = require("./Helpers/isRuneId");
98
126
  Object.defineProperty(exports, "isRuneId", { enumerable: true, get: function () { return isRuneId_1.isRuneId; } });
99
127
  var isRuneName_1 = require("./Helpers/isRuneName");
100
128
  Object.defineProperty(exports, "isRuneName", { enumerable: true, get: function () { return isRuneName_1.isRuneName; } });
129
+ // ##
130
+ var isSpellId_1 = require("./Helpers/isSpellId");
131
+ Object.defineProperty(exports, "isSpellId", { enumerable: true, get: function () { return isSpellId_1.isSpellId; } });
132
+ var isSpellKey_1 = require("./Helpers/isSpellKey");
133
+ Object.defineProperty(exports, "isSpellKey", { enumerable: true, get: function () { return isSpellKey_1.isSpellKey; } });
134
+ var isSpellName_1 = require("./Helpers/isSpellName");
135
+ Object.defineProperty(exports, "isSpellName", { enumerable: true, get: function () { return isSpellName_1.isSpellName; } });
136
+ // ##
101
137
  var isStatRuneId_1 = require("./Helpers/isStatRuneId");
102
138
  Object.defineProperty(exports, "isStatRuneId", { enumerable: true, get: function () { return isStatRuneId_1.isStatRuneId; } });
103
139
  var isStatRuneName_1 = require("./Helpers/isStatRuneName");
104
140
  Object.defineProperty(exports, "isStatRuneName", { enumerable: true, get: function () { return isStatRuneName_1.isStatRuneName; } });
105
- var isSummonerSpellId_1 = require("./Helpers/isSummonerSpellId");
106
- Object.defineProperty(exports, "isSummonerSpellId", { enumerable: true, get: function () { return isSummonerSpellId_1.isSummonerSpellId; } });
107
- var isSummonerSpellKey_1 = require("./Helpers/isSummonerSpellKey");
108
- Object.defineProperty(exports, "isSummonerSpellKey", { enumerable: true, get: function () { return isSummonerSpellKey_1.isSummonerSpellKey; } });
109
- var isSummonerSpellName_1 = require("./Helpers/isSummonerSpellName");
110
- Object.defineProperty(exports, "isSummonerSpellName", { enumerable: true, get: function () { return isSummonerSpellName_1.isSummonerSpellName; } });
141
+ // ##
111
142
  var isTreeRuneId_1 = require("./Helpers/isTreeRuneId");
112
143
  Object.defineProperty(exports, "isTreeRuneId", { enumerable: true, get: function () { return isTreeRuneId_1.isTreeRuneId; } });
113
144
  var isTreeRuneName_1 = require("./Helpers/isTreeRuneName");
114
145
  Object.defineProperty(exports, "isTreeRuneName", { enumerable: true, get: function () { return isTreeRuneName_1.isTreeRuneName; } });
146
+ // # scripts
147
+ // —
148
+ // # types
115
149
  __exportStar(require("./types"), exports);
116
150
  __exportStar(require("./types/Meta"), exports);
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Wraps the provided JSON in a TS export-as-const statement.
3
+ */
4
+ export declare function getExportStatement(constName: string, json: {
5
+ [k: string]: any;
6
+ }): string;
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getExportStatement = void 0;
4
+ /**
5
+ * Wraps the provided JSON in a TS export-as-const statement.
6
+ */
7
+ function getExportStatement(constName, json) {
8
+ return `export const ${constName} = ${JSON.stringify(json)} as const`;
9
+ }
10
+ exports.getExportStatement = getExportStatement;
@@ -1 +1,16 @@
1
- export {};
1
+ import './generate-champion-ids-by-name';
2
+ import './generate-champion-ids';
3
+ import './generate-champion-keys';
4
+ import './generate-champion-names';
5
+ import './generate-item-keys';
6
+ import './generate-item-names';
7
+ import './generate-rune-ids';
8
+ import './generate-rune-names';
9
+ import './generate-spell-ids-by-name';
10
+ import './generate-spell-ids';
11
+ import './generate-spell-keys';
12
+ import './generate-spell-names';
13
+ import './generate-stat-rune-ids';
14
+ import './generate-stat-rune-names';
15
+ import './generate-tree-rune-ids';
16
+ import './generate-tree-rune-names';
@@ -1,19 +1,18 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- const generateChampionsByKey_1 = require("../Helpers/generateChampionsByKey");
4
- const generateChampionsByName_1 = require("../Helpers/generateChampionsByName");
5
- const generateItemsByName_1 = require("../Helpers/generateItemsByName");
6
- const generateRunesById_1 = require("../Helpers/generateRunesById");
7
- const generateRunesByName_1 = require("../Helpers/generateRunesByName");
8
- const generateSummonerSpellsByKey_1 = require("../Helpers/generateSummonerSpellsByKey");
9
- const generateSummonerSpellsByName_1 = require("../Helpers/generateSummonerSpellsByName");
10
- const generateJSONs = () => {
11
- (0, generateChampionsByKey_1.generateChampionsByKey)();
12
- (0, generateChampionsByName_1.generateChampionsByName)();
13
- (0, generateItemsByName_1.generateItemsByName)();
14
- (0, generateRunesById_1.generateRunesById)();
15
- (0, generateRunesByName_1.generateRunesByName)();
16
- (0, generateSummonerSpellsByKey_1.generateSummonerSpellsByKey)();
17
- (0, generateSummonerSpellsByName_1.generateSummonerSpellsByName)();
18
- };
19
- generateJSONs();
3
+ require("./generate-champion-ids-by-name");
4
+ require("./generate-champion-ids");
5
+ require("./generate-champion-keys");
6
+ require("./generate-champion-names");
7
+ require("./generate-item-keys");
8
+ require("./generate-item-names");
9
+ require("./generate-rune-ids");
10
+ require("./generate-rune-names");
11
+ require("./generate-spell-ids-by-name");
12
+ require("./generate-spell-ids");
13
+ require("./generate-spell-keys");
14
+ require("./generate-spell-names");
15
+ require("./generate-stat-rune-ids");
16
+ require("./generate-stat-rune-names");
17
+ require("./generate-tree-rune-ids");
18
+ require("./generate-tree-rune-names");
@@ -0,0 +1 @@
1
+ export {};
@@ -3,20 +3,18 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.generateChampionsByKey = void 0;
7
6
  const fs_1 = __importDefault(require("fs"));
8
7
  const champion_json_1 = __importDefault(require("../assets/champion.json"));
9
- function generateChampionsByKey() {
10
- const championsByKey = {
11
- data: {},
12
- version: '',
13
- };
8
+ const getExportStatement_1 = require("./Helpers/getExportStatement");
9
+ (async () => {
10
+ const championIds = {};
11
+ // Extract all Champion IDs
14
12
  let championId;
15
13
  for (championId in champion_json_1.default.data) {
16
14
  const championData = champion_json_1.default.data[championId];
17
- championsByKey.data[championData.key] = championData;
15
+ championIds[championData.name] = championId;
18
16
  }
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;
17
+ // Write to tmp file
18
+ const constName = 'ChampionIdsByName';
19
+ fs_1.default.writeFileSync(`tmp/${constName}.ts`, (0, getExportStatement_1.getExportStatement)(constName, championIds));
20
+ })();
@@ -0,0 +1 @@
1
+ export {};
@@ -3,20 +3,18 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.generateChampionsByName = void 0;
7
6
  const fs_1 = __importDefault(require("fs"));
8
7
  const champion_json_1 = __importDefault(require("../assets/champion.json"));
9
- function generateChampionsByName() {
10
- const championsByName = {
11
- data: {},
12
- version: '',
13
- };
8
+ const getExportStatement_1 = require("./Helpers/getExportStatement");
9
+ (async () => {
10
+ const championIds = {};
11
+ // Extract all Champion IDs
14
12
  let championId;
15
13
  for (championId in champion_json_1.default.data) {
16
14
  const championData = champion_json_1.default.data[championId];
17
- championsByName.data[championData.name] = championData;
15
+ championIds[championData.key] = championId;
18
16
  }
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;
17
+ // Write to tmp file
18
+ const constName = 'ChampionIds';
19
+ fs_1.default.writeFileSync(`tmp/${constName}.ts`, (0, getExportStatement_1.getExportStatement)(constName, championIds));
20
+ })();
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,20 @@
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
+ const fs_1 = __importDefault(require("fs"));
7
+ const champion_json_1 = __importDefault(require("../assets/champion.json"));
8
+ const getExportStatement_1 = require("./Helpers/getExportStatement");
9
+ (async () => {
10
+ const championKeys = {};
11
+ // Add all champions' data to each corresponding key value
12
+ let championId;
13
+ for (championId in champion_json_1.default.data) {
14
+ const championData = champion_json_1.default.data[championId];
15
+ championKeys[championId] = championData.key;
16
+ }
17
+ // Write to file
18
+ const constName = 'ChampionKeys';
19
+ fs_1.default.writeFileSync(`tmp/${constName}.ts`, (0, getExportStatement_1.getExportStatement)(constName, championKeys));
20
+ })();
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,20 @@
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
+ const fs_1 = __importDefault(require("fs"));
7
+ const champion_json_1 = __importDefault(require("../assets/champion.json"));
8
+ const getExportStatement_1 = require("./Helpers/getExportStatement");
9
+ (async () => {
10
+ const championNames = {};
11
+ // Extract all champion names from `champion.json`
12
+ let championId;
13
+ for (championId in champion_json_1.default.data) {
14
+ const championData = champion_json_1.default.data[championId];
15
+ championNames[championData.key] = championData.name;
16
+ }
17
+ // Write to file
18
+ const constName = 'ChampionNames';
19
+ fs_1.default.writeFileSync(`tmp/${constName}.ts`, (0, getExportStatement_1.getExportStatement)(constName, championNames));
20
+ })();
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,21 @@
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
+ const fs_1 = __importDefault(require("fs"));
7
+ const item_json_1 = __importDefault(require("../assets/item.json"));
8
+ const getExportStatement_1 = require("./Helpers/getExportStatement");
9
+ (async () => {
10
+ const itemKeys = {};
11
+ // Add all items' data to each corresponding name value
12
+ let itemKey;
13
+ for (itemKey in item_json_1.default.data) {
14
+ const itemData = item_json_1.default.data[itemKey];
15
+ let htmlEscapedName = itemData.name.replace(/<[^>]*>?/gm, '');
16
+ itemKeys[htmlEscapedName] = itemKey;
17
+ }
18
+ // Write to file
19
+ const constName = 'ItemKeys';
20
+ fs_1.default.writeFileSync(`tmp/${constName}.ts`, (0, getExportStatement_1.getExportStatement)(constName, itemKeys));
21
+ })();
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,21 @@
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
+ const fs_1 = __importDefault(require("fs"));
7
+ const item_json_1 = __importDefault(require("../assets/item.json"));
8
+ const getExportStatement_1 = require("./Helpers/getExportStatement");
9
+ (async () => {
10
+ const itemNames = {};
11
+ // Add all items' data to each corresponding name value
12
+ let itemKey;
13
+ for (itemKey in item_json_1.default.data) {
14
+ const itemData = item_json_1.default.data[itemKey];
15
+ let htmlEscapedName = itemData.name.replace(/<[^>]*>?/gm, '');
16
+ itemNames[itemKey] = htmlEscapedName;
17
+ }
18
+ // Write to file
19
+ const constName = 'ItemNames';
20
+ fs_1.default.writeFileSync(`tmp/${constName}.ts`, (0, getExportStatement_1.getExportStatement)(constName, itemNames));
21
+ })();
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,29 @@
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
+ const fs_1 = __importDefault(require("fs"));
7
+ const runesReforged_json_1 = __importDefault(require("../assets/runesReforged.json"));
8
+ const StatRunes_1 = require("../assets/StatRunes");
9
+ const getExportStatement_1 = require("./Helpers/getExportStatement");
10
+ (async () => {
11
+ const runeIds = {};
12
+ // Construct the new data and assign it to product object
13
+ for (const runeTree of runesReforged_json_1.default) {
14
+ for (const { runes } of runeTree.slots) {
15
+ for (const rune of runes) {
16
+ runeIds[rune.name] = String(rune.id);
17
+ }
18
+ }
19
+ }
20
+ // Add Stat Runes
21
+ let statRuneId;
22
+ for (statRuneId in StatRunes_1.StatRunes) {
23
+ const statRuneName = StatRunes_1.StatRunes[statRuneId];
24
+ runeIds[statRuneName] = statRuneId;
25
+ }
26
+ // Write to file
27
+ const constName = 'RuneIds';
28
+ fs_1.default.writeFileSync(`tmp/${constName}.ts`, (0, getExportStatement_1.getExportStatement)(constName, runeIds));
29
+ })();
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,29 @@
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
+ const fs_1 = __importDefault(require("fs"));
7
+ const runesReforged_json_1 = __importDefault(require("../assets/runesReforged.json"));
8
+ const StatRunes_1 = require("../assets/StatRunes");
9
+ const getExportStatement_1 = require("./Helpers/getExportStatement");
10
+ (async () => {
11
+ const runeNames = {};
12
+ // Construct the new data and assign it to product object
13
+ for (const runeTree of runesReforged_json_1.default) {
14
+ for (const { runes } of runeTree.slots) {
15
+ for (const rune of runes) {
16
+ runeNames[rune.id] = rune.name;
17
+ }
18
+ }
19
+ }
20
+ // Add Stat Runes
21
+ let statRuneId;
22
+ for (statRuneId in StatRunes_1.StatRunes) {
23
+ const statRuneName = StatRunes_1.StatRunes[statRuneId];
24
+ runeNames[statRuneId] = statRuneName;
25
+ }
26
+ // Write to file
27
+ const constName = 'RuneNames';
28
+ fs_1.default.writeFileSync(`tmp/${constName}.ts`, (0, getExportStatement_1.getExportStatement)(constName, runeNames));
29
+ })();
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,20 @@
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
+ const fs_1 = __importDefault(require("fs"));
7
+ const summoner_json_1 = __importDefault(require("../assets/summoner.json"));
8
+ const getExportStatement_1 = require("./Helpers/getExportStatement");
9
+ (async () => {
10
+ const spellIds = {};
11
+ // Add all summoners spell data to each corresponding key value
12
+ let spellId;
13
+ for (spellId in summoner_json_1.default.data) {
14
+ const spellData = summoner_json_1.default.data[spellId];
15
+ spellIds[spellData.name] = spellId;
16
+ }
17
+ // Write to file
18
+ const constName = 'SpellIdsByName';
19
+ fs_1.default.writeFileSync(`tmp/${constName}.ts`, (0, getExportStatement_1.getExportStatement)(constName, spellIds));
20
+ })();
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,20 @@
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
+ const fs_1 = __importDefault(require("fs"));
7
+ const summoner_json_1 = __importDefault(require("../assets/summoner.json"));
8
+ const getExportStatement_1 = require("./Helpers/getExportStatement");
9
+ (async () => {
10
+ const spellIds = {};
11
+ // Add all summoners spell data to each corresponding key value
12
+ let spellId;
13
+ for (spellId in summoner_json_1.default.data) {
14
+ const spellData = summoner_json_1.default.data[spellId];
15
+ spellIds[spellData.key] = spellId;
16
+ }
17
+ // Write to file
18
+ const constName = 'SpellIds';
19
+ fs_1.default.writeFileSync(`tmp/${constName}.ts`, (0, getExportStatement_1.getExportStatement)(constName, spellIds));
20
+ })();
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,20 @@
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
+ const fs_1 = __importDefault(require("fs"));
7
+ const summoner_json_1 = __importDefault(require("../assets/summoner.json"));
8
+ const getExportStatement_1 = require("./Helpers/getExportStatement");
9
+ (async () => {
10
+ const spellKeys = {};
11
+ // Add all summoners spell data to each corresponding key value
12
+ let spellId;
13
+ for (spellId in summoner_json_1.default.data) {
14
+ const spellData = summoner_json_1.default.data[spellId];
15
+ spellKeys[spellId] = spellData.key;
16
+ }
17
+ // Write to file
18
+ const constName = 'SpellKeys';
19
+ fs_1.default.writeFileSync(`tmp/${constName}.ts`, (0, getExportStatement_1.getExportStatement)(constName, spellKeys));
20
+ })();
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,20 @@
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
+ const fs_1 = __importDefault(require("fs"));
7
+ const summoner_json_1 = __importDefault(require("../assets/summoner.json"));
8
+ const getExportStatement_1 = require("./Helpers/getExportStatement");
9
+ (async () => {
10
+ const spellNames = {};
11
+ // Add all summoners spell data to each corresponding key value
12
+ let spellId;
13
+ for (spellId in summoner_json_1.default.data) {
14
+ const spellData = summoner_json_1.default.data[spellId];
15
+ spellNames[spellData.key] = spellData.name;
16
+ }
17
+ // Write to file
18
+ const constName = 'SpellNames';
19
+ fs_1.default.writeFileSync(`tmp/${constName}.ts`, (0, getExportStatement_1.getExportStatement)(constName, spellNames));
20
+ })();
@@ -0,0 +1 @@
1
+ export {};