From fd3fafe8fc3f27be0c529c29ce6381fee5def3b1 Mon Sep 17 00:00:00 2001 From: Northword Date: Sat, 1 Jul 2023 17:50:50 +0800 Subject: [PATCH 1/2] Rename `typings` folder --- src/addon.ts | 2 +- tsconfig.json | 2 +- {typing => typings}/global.d.ts | 0 3 files changed, 2 insertions(+), 2 deletions(-) rename {typing => typings}/global.d.ts (100%) diff --git a/src/addon.ts b/src/addon.ts index 87b6b89..7cf752d 100644 --- a/src/addon.ts +++ b/src/addon.ts @@ -45,7 +45,7 @@ class Addon { * and comment line 31: `ztoolkit: new ZoteroToolkit(),`. * 2. Uncomment this file's line 10: `ztoolkit: MyToolkit;` in this file * and comment line 11: `ztoolkit: ZoteroToolkit;`. - * 3. Uncomment `./typing/global.d.ts` line 12: `declare const ztoolkit: import("../src/addon").MyToolkit;` + * 3. Uncomment `../typings/global.d.ts` line 12: `declare const ztoolkit: import("../src/addon").MyToolkit;` * and comment line 13: `declare const ztoolkit: import("zotero-plugin-toolkit").ZoteroToolkit;`. * * You can now add the modules under the `MyToolkit` class. diff --git a/tsconfig.json b/tsconfig.json index 65c5124..c471616 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -7,6 +7,6 @@ "skipLibCheck": true, "strict": true }, - "include": ["src", "typing", "node_modules/zotero-types"], + "include": ["src", "typings", "node_modules/zotero-types"], "exclude": ["builds", "addon"] } diff --git a/typing/global.d.ts b/typings/global.d.ts similarity index 100% rename from typing/global.d.ts rename to typings/global.d.ts From 6576618634ee6acf6a02b27ccf2ce5b03ba0ba3e Mon Sep 17 00:00:00 2001 From: Northword Date: Sat, 1 Jul 2023 18:04:36 +0800 Subject: [PATCH 2/2] Rename build folder --- .eslintrc.json | 2 +- .gitignore | 2 +- .release-it.json | 2 +- scripts/build.mjs | 2 +- tsconfig.json | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.eslintrc.json b/.eslintrc.json index 5aa2af8..24ac057 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -23,7 +23,7 @@ "@typescript-eslint/no-non-null-assertion": "off" }, "ignorePatterns": [ - "**/builds/**", + "**/build/**", "**/dist/**", "**/node_modules/**", "**/scripts/**", diff --git a/.gitignore b/.gitignore index d2d96bf..d277962 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,4 @@ -**/builds +**/build node_modules package-lock.json zotero-cmd.json \ No newline at end of file diff --git a/.release-it.json b/.release-it.json index 2b66daf..083b14b 100644 --- a/.release-it.json +++ b/.release-it.json @@ -4,7 +4,7 @@ }, "github": { "release": true, - "assets": ["builds/*.xpi"] + "assets": ["build/*.xpi"] }, "hooks": { "after:bump": "npm run build", diff --git a/scripts/build.mjs b/scripts/build.mjs index 7e5079a..709a0ae 100644 --- a/scripts/build.mjs +++ b/scripts/build.mjs @@ -87,7 +87,7 @@ function dateFormat(fmt, date) { async function main() { const t = new Date(); const buildTime = dateFormat("YYYY-mm-dd HH:MM:SS", t); - const buildDir = "builds"; + const buildDir = "build"; console.log( `[Build] BUILD_DIR=${buildDir}, VERSION=${version}, BUILD_TIME=${buildTime}, ENV=${[ diff --git a/tsconfig.json b/tsconfig.json index c471616..a033072 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -8,5 +8,5 @@ "strict": true }, "include": ["src", "typings", "node_modules/zotero-types"], - "exclude": ["builds", "addon"] + "exclude": ["build", "addon"] }