@cabin-icarus/tooltip_generator 1.7.0 → 1.7.2
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/.github/workflows/npm-publish.yml +1 -12
- package/fsWatcher.ts +4 -4
- package/init.ts +1 -1
- package/install.ts +3 -3
- package/localizationCompiler.ts +2 -2
- package/package.json +1 -1
|
@@ -3,21 +3,10 @@
|
|
|
3
3
|
|
|
4
4
|
name: Node.js Package
|
|
5
5
|
|
|
6
|
-
on:
|
|
7
|
-
release:
|
|
8
|
-
types: [created]
|
|
6
|
+
on: workflow_dispatch
|
|
9
7
|
|
|
10
8
|
jobs:
|
|
11
|
-
build:
|
|
12
|
-
runs-on: ubuntu-latest
|
|
13
|
-
steps:
|
|
14
|
-
- uses: actions/checkout@v3
|
|
15
|
-
- uses: actions/setup-node@v3
|
|
16
|
-
with:
|
|
17
|
-
node-version: 14
|
|
18
|
-
|
|
19
9
|
publish-npm:
|
|
20
|
-
needs: build
|
|
21
10
|
runs-on: ubuntu-latest
|
|
22
11
|
steps:
|
|
23
12
|
- uses: actions/checkout@v3
|
package/fsWatcher.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
const fs = require('fs');
|
|
2
2
|
import { LocalizationCompiler } from './localizationCompiler';
|
|
3
|
-
import { LocalizationData} from './localizationInterfaces';
|
|
3
|
+
import { LocalizationData } from './localizationInterfaces';
|
|
4
4
|
const watch = require("node-watch");
|
|
5
5
|
|
|
6
6
|
let completeData: {[path: string]: LocalizationData} = {};
|
|
@@ -9,13 +9,13 @@ const generatorPath = "node_modules/~generator";
|
|
|
9
9
|
|
|
10
10
|
console.log(fs.realpathSync(generatorPath));
|
|
11
11
|
|
|
12
|
-
let watcher = watch([resourcePath + "/localization"
|
|
12
|
+
let watcher = watch([resourcePath + "/localization"], {recursive: true})
|
|
13
13
|
watcher.on("change", (eventType ?: 'update' | 'remove' | undefined, filePath ?: string) => {
|
|
14
14
|
if (!filePath) return;
|
|
15
15
|
if (filePath.includes("localizationCompiler.ts")) {
|
|
16
16
|
compiler = loadCompiler();
|
|
17
17
|
}
|
|
18
|
-
let match = /(node_modules[\\/])?(.*[\/|\\](\w+)).
|
|
18
|
+
let match = /(node_modules[\\/])?(.*[\/|\\](\w+)).ts/g.exec(filePath);
|
|
19
19
|
if (eventType == "update" && filePath && match) {
|
|
20
20
|
const curpath = match[2];
|
|
21
21
|
const data = getDataFromFile(curpath + ".ts");
|
package/init.ts
CHANGED
package/install.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
const fs = require('fs');
|
|
2
|
+
const child = require('child_process');
|
|
3
3
|
|
|
4
4
|
interface packageSnippet {
|
|
5
5
|
scripts?: {[name: string]: string};
|
|
@@ -21,7 +21,7 @@ const aliases = [
|
|
|
21
21
|
// Check package.json
|
|
22
22
|
function CheckPackage() {
|
|
23
23
|
console.log("Searching for package.json...");
|
|
24
|
-
const rootPath = "
|
|
24
|
+
const rootPath = "../../../../";
|
|
25
25
|
const scriptPath = "./";
|
|
26
26
|
|
|
27
27
|
// adjust existing package.json
|
package/localizationCompiler.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
const fs = require('fs');
|
|
2
|
+
const path = require('path');
|
|
3
3
|
import { KVObject, serialize } from 'valve-kv'
|
|
4
4
|
import { LocalizationData, AbilityLocalization, ModifierLocalization, StandardLocalization } from "./localizationInterfaces";
|
|
5
5
|
import { Language } from "~resource/languages"
|
package/package.json
CHANGED