Skip to content

Build your personal knowledge base with Trilium Notes

scripts/update contributor list: refactor

Adorian Doran015e50cdb8fd
diff --git a/packages/commons/src/index.ts b/packages/commons/src/index.ts
index b208bfd3b6..ab0a71677a 100644
--- a/packages/commons/src/index.ts
+++ b/packages/commons/src/index.ts
@@ -8,6 +8,7 @@ export * from "./lib/mime_type.js";
export * from "./lib/bulk_actions.js";
export * from "./lib/server_api.js";
export * from "./lib/shared_constants.js";
+export * from "./lib/shared_types.js";
export * from "./lib/ws_api.js";
export * from "./lib/attribute_names.js";
export * from "./lib/utils.js";
@@ -15,4 +16,4 @@ export * from "./lib/dayjs.js";
export * from "./lib/notes.js";
export * from "./lib/week_utils.js";
export { default as BUILTIN_ATTRIBUTES } from "./lib/builtin_attributes.js";
-export * from "./lib/spreadsheet/render_to_html.js";
+export * from "./lib/spreadsheet/render_to_html.js";
\ No newline at end of file
diff --git a/packages/commons/src/lib/shared_types.ts b/packages/commons/src/lib/shared_types.ts
new file mode 100644
index 0000000000..571506d2d9
--- /dev/null
+++ b/packages/commons/src/lib/shared_types.ts
@@ -0,0 +1,9 @@
+export interface ContributorList {
+ contributors: Contributor[];
+}
+
+export interface Contributor {
+ name: string;
+ url: string;
+ role?: "lead-dev" | "original-dev";
+}
\ No newline at end of file
diff --git a/scripts/update-contributor-list.ts b/scripts/update-contributor-list.ts
index e8dcbcf515..56f6e444b4 100644
--- a/scripts/update-contributor-list.ts
+++ b/scripts/update-contributor-list.ts
@@ -1,14 +1,6 @@
import { writeFileSync } from "fs";
-export interface ContributorList {
- contributors: Contributor[];
-}
-
-export interface Contributor {
- name: string;
- url: string;
- role?: "lead-dev" | "original-dev";
-}
+import {Contributor, ContributorList} from "../packages/commons/";
// Keep honorific contributors at top of the list, even if their commit count
// is exceeded by another users.