From a9afa0e9e5b65eebf6df12233e3cec118bab4553 Mon Sep 17 00:00:00 2001 From: James Cook Date: Fri, 15 Sep 2023 17:06:59 +0100 Subject: [PATCH] feat: export types to classcharts-api/types This allow types to be easily accessed without knowing the full path. Eliminates the need to decide which types should be exported from mod.ts --- mod.ts | 11 ----------- scripts/build_npm.ts | 8 +++++++- 2 files changed, 7 insertions(+), 12 deletions(-) diff --git a/mod.ts b/mod.ts index 32eb371..249b084 100644 --- a/mod.ts +++ b/mod.ts @@ -1,13 +1,2 @@ export * from "./src/core/studentClient.ts"; export * from "./src/core/parentClient.ts"; -export type { - ActivityPoint, - Announcement, - AttendanceDate, - Badge, - BehaviourTimelinePoint, - Detention, - Homework, - Lesson, - Student, -} from "./src/types.ts"; diff --git a/scripts/build_npm.ts b/scripts/build_npm.ts index 0d02947..4d7cf8d 100644 --- a/scripts/build_npm.ts +++ b/scripts/build_npm.ts @@ -5,7 +5,13 @@ if (!Deno.args[0]) throw new Error("No version specified"); await emptyDir("./npm"); await build({ - entryPoints: ["./mod.ts"], + entryPoints: [{ + name: ".", + path: "./mod.ts", + }, { + name: "./types", + path: "./src/types.ts", + }], outDir: "./npm", shims: { deno: true,