@cabin-icarus/tooltip_generator 1.7.7 → 1.7.9

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.
package/init.ts CHANGED
@@ -16,36 +16,36 @@ function copyFiles() {
16
16
  fs.copyFileSync(filePath, resultPath);
17
17
  console.log(`Not found, tsconfig.json copied to ${resultPath} folder`);
18
18
  }
19
- filePath = __dirname + "/ModifierProperties.d.ts";
20
- resultPath = resourcePath + "/ModifierProperties.d.ts";
21
- console.log(`Checking if ModifierProperties.d.ts exists in ${filePath}`)
22
- if (fs.existsSync(resultPath))
23
- {
24
- console.log("ModifierProperties.d.ts found!");
25
- } else {
26
- fs.copyFileSync(filePath, resultPath);
27
- console.log(`Not found, ModifierProperties.d.ts copied to ${resultPath} folder`);
28
- }
29
- filePath = __dirname + "/languages.ts";
30
- resultPath = resourcePath + "/languages.ts";
31
- console.log(`Checking if languages.ts exsts in ${filePath}`)
32
- if (fs.existsSync(resultPath))
33
- {
34
- console.log("languages.ts found!");
35
- } else {
36
- fs.copyFileSync(filePath, resultPath);
37
- console.log(`Not found, languages.ts copied to ${resultPath} folder`);
38
- }
39
- filePath = __dirname + "/languages.js";
40
- resultPath = resourcePath + "/languages.js";
41
- console.log(`Checking if languages.js exsts in ${filePath}`)
42
- if (fs.existsSync(resultPath))
43
- {
44
- console.log("languages.js found!");
45
- } else {
46
- fs.copyFileSync(filePath, resultPath);
47
- console.log(`Not found, languages.js copied to ${resultPath} folder`);
48
- }
19
+ // filePath = __dirname + "/ModifierProperties.d.ts";
20
+ // resultPath = resourcePath + "/ModifierProperties.d.ts";
21
+ // console.log(`Checking if ModifierProperties.d.ts exists in ${filePath}`)
22
+ // if (fs.existsSync(resultPath))
23
+ // {
24
+ // console.log("ModifierProperties.d.ts found!");
25
+ // } else {
26
+ // fs.copyFileSync(filePath, resultPath);
27
+ // console.log(`Not found, ModifierProperties.d.ts copied to ${resultPath} folder`);
28
+ // }
29
+ // filePath = __dirname + "/languages.d.ts";
30
+ // resultPath = resourcePath + "/languages.ts";
31
+ // console.log(`Checking if languages.ts exsts in ${filePath}`)
32
+ // if (fs.existsSync(resultPath))
33
+ // {
34
+ // console.log("languages.ts found!");
35
+ // } else {
36
+ // fs.copyFileSync(filePath, resultPath);
37
+ // console.log(`Not found, languages.ts copied to ${resultPath} folder`);
38
+ // }
39
+ // filePath = __dirname + "/languages.ts";
40
+ // resultPath = resourcePath + "/languages.ts";
41
+ // console.log(`Checking if languages.js exsts in ${filePath}`)
42
+ // if (fs.existsSync(resultPath))
43
+ // {
44
+ // console.log("languages.js found!");
45
+ // } else {
46
+ // fs.copyFileSync(filePath, resultPath);
47
+ // console.log(`Not found, languages.js copied to ${resultPath} folder`);
48
+ // }
49
49
  }
50
50
 
51
51
  let dirPath = __dirname + "/localization";
@@ -65,9 +65,9 @@ function copyFiles() {
65
65
  {
66
66
  fs.copyFileSync(dirPath + "/localizationData.ts", resultPath + "/localizationData.ts");
67
67
  }
68
- if (!fs.existsSync(resultPath + "/localizationData.js"))
68
+ if (!fs.existsSync(resultPath + "/localizationData.ts"))
69
69
  {
70
- fs.copyFileSync(dirPath + "/localizationData.js", resultPath + "/localizationData.js");
70
+ fs.copyFileSync(dirPath + "/localizationData.ts", resultPath + "/localizationData.ts");
71
71
  }
72
72
  }
73
73
  }
@@ -92,7 +92,7 @@ function changeImports()
92
92
  })
93
93
  }
94
94
 
95
- const compilerJSFilePath = __dirname + "/localizationCompiler.js";
95
+ const compilerJSFilePath = __dirname + "/localizationCompiler.ts";
96
96
 
97
97
  if (fs.existsSync(compilerJSFilePath))
98
98
  {
package/install.ts CHANGED
@@ -24,8 +24,6 @@ function CheckPackage() {
24
24
  const rootPath = "../../../";
25
25
  const scriptPath = "./";
26
26
 
27
- console.log("F: ",fs.realpathSync(rootPath + "package.json"))
28
-
29
27
  // adjust existing package.json
30
28
  if (fs.existsSync(rootPath + "package.json")) {
31
29
  console.log("Checking existing package.json...")
@@ -46,7 +44,7 @@ function CheckPackage() {
46
44
  hasDev = true;
47
45
  }
48
46
  if (name == "init") {
49
- if (scripts[name] !== "link-module-alias && node node_modules/~generator/init.js") {
47
+ if (scripts[name] !== "link-module-alias && node node_modules/~generator/init.ts") {
50
48
  console.log("\x1b[31m%s\x1b[0m", "Unexpected 'init' script in package.json!");
51
49
  return;
52
50
  }
@@ -121,14 +119,8 @@ function CheckPackage() {
121
119
 
122
120
  // copy the default package.json if there wasn't any previously
123
121
  } else {
124
- const copyPackage = scriptPath + "_package.json";
125
- if (fs.existsSync(copyPackage)) {
126
- console.log("Copying new package.json");
127
- fs.copyFileSync(copyPackage, rootPath + "package.json");
128
- } else {
129
- console.log("\x1b[31m%s\x1b[0m", "\nCouldn't find _package.json! Have you installed this module correctly?")
130
- return;
131
- }
122
+ console.log("\x1b[31m%s\x1b[0m", "\n项目根目录没有package.json文件")
123
+ return;
132
124
  }
133
125
  console.log("Running final installation, please wait for the success message...")
134
126
  child.exec("yarn install", {
@@ -143,6 +135,4 @@ function CheckPackage() {
143
135
  })
144
136
  }
145
137
 
146
- console.log("F: ",fs.realpathSync("../../../package.json"))
147
-
148
138
  CheckPackage();
@@ -1,4 +1,4 @@
1
- export enum Language
1
+ declare const enum Language
2
2
  {
3
3
  None = 'none',
4
4
  // Brazilian = 'brazilian',
@@ -1,6 +1,3 @@
1
- import { AbilityLocalization, LocalizationData, ModifierLocalization, StandardLocalization } from "../localizationInterfaces";
2
- import { Language } from "../languages";
3
-
4
1
  export function GenerateLocalizationData(): LocalizationData
5
2
  {
6
3
  // This section can be safely ignored, as it is only logic.
@@ -1,6 +1,4 @@
1
- import { Language } from "./languages";
2
-
3
- export interface AbilityLocalization
1
+ declare interface AbilityLocalization
4
2
  {
5
3
  ability_classname: string;
6
4
  name?: string;
@@ -14,7 +12,7 @@ export interface AbilityLocalization
14
12
  language_overrides?: Array<AbilityLocalizationContent>;
15
13
  }
16
14
 
17
- export interface AbilityLocalizationContent
15
+ declare interface AbilityLocalizationContent
18
16
  {
19
17
  language: Language;
20
18
  name_override?: string;
@@ -27,7 +25,7 @@ export interface AbilityLocalizationContent
27
25
  ability_specials_override?: Array<AbilitySpecialLocalization>;
28
26
  }
29
27
 
30
- export interface ModifierLocalization
28
+ declare interface ModifierLocalization
31
29
  {
32
30
  modifier_classname: string;
33
31
  name?: string;
@@ -35,21 +33,21 @@ export interface ModifierLocalization
35
33
  language_overrides?: Array<ModifierLocalizationContent>;
36
34
  }
37
35
 
38
- export interface ModifierLocalizationContent
36
+ declare interface ModifierLocalizationContent
39
37
  {
40
38
  language: Language;
41
39
  name_override?: string
42
40
  description_override?: string;
43
41
  }
44
42
 
45
- export interface StandardLocalization
43
+ declare interface StandardLocalization
46
44
  {
47
45
  classname: string;
48
46
  name: string;
49
47
  language_overrides?: StandardLocalizationNameOverride[]
50
48
  }
51
49
 
52
- export interface StandardLocalizationNameOverride
50
+ declare interface StandardLocalizationNameOverride
53
51
  {
54
52
  language: Language;
55
53
  name_override: string
@@ -61,7 +59,7 @@ export interface StandardLocalizationNameOverride
61
59
  // description: string;
62
60
  // }
63
61
 
64
- export interface AbilitySpecialLocalization
62
+ declare interface AbilitySpecialLocalization
65
63
  {
66
64
  ability_special: string;
67
65
  text: string;
@@ -91,7 +89,7 @@ export interface AbilitySpecialLocalization
91
89
  // lore_override?: string;
92
90
  // }
93
91
 
94
- export interface LocalizationData
92
+ declare interface LocalizationData
95
93
  {
96
94
  AbilityArray?: Array<AbilityLocalization>;
97
95
  ModifierArray?: Array<ModifierLocalization>;
package/package.json CHANGED
@@ -45,5 +45,5 @@
45
45
  "dev:runlocalizationWatcher": "ts-node node_modules/~generator/fsWatcher.ts",
46
46
  "init": "link-module-alias && ts-node node_modules/~generator/init.ts"
47
47
  },
48
- "version": "1.7.7"
48
+ "version": "1.7.9"
49
49
  }
package/_package.json DELETED
@@ -1,30 +0,0 @@
1
- {
2
- "name": "tooltip_generator",
3
- "version": "1.3.14",
4
- "scripts": {
5
- "build": "run-p build:*",
6
- "dev": "run-p dev:*",
7
- "dev:localizationCompiler": "tsc --project node_modules/~resource/tsconfig.json",
8
- "dev:localizationCompilerWatcher": "tsc --project node_modules/~resource/tsconfig.json --watch",
9
- "dev:runlocalizationWatcher": "node node_modules/~generator/fsWatcher.js",
10
- "dev:localizationGeneratorWatcher": "tsc --project node_modules/~generator/tsconfig.json",
11
- "init": "link-module-alias && node node_modules/~generator/init.js"
12
- },
13
- "_moduleAliases": {
14
- "~resource": "resource",
15
- "~generator": "node_modules/@shushishtok/tooltip_generator"
16
- },
17
- "devDependencies": {
18
- "@types/node": "^14.14.20",
19
- "fs-extra": "^9.0.1",
20
- "ts-node": "^9.1.1"
21
- },
22
- "dependencies": {
23
- "@shushishtok/tooltip_generator": "^1.2.3",
24
- "link-module-alias": "^1.2.0",
25
- "node-watch": "^0.7.1",
26
- "npm-run-all": "^4.1.5",
27
- "typescript": "^4.1.3",
28
- "valve-kv": "^1.0.1"
29
- }
30
- }