1
0
Fork 0
mirror of https://github.com/classchartsapi/classcharts-api-js.git synced 2026-05-11 18:59:05 +00:00

fix: remove import map

Doesn't work with importing in deno
This commit is contained in:
James Cook 2023-09-24 13:36:35 +01:00
parent 51af82ea9a
commit b2af13c315
8 changed files with 16 additions and 19 deletions

View file

@ -2,8 +2,5 @@
"tasks": { "tasks": {
"npm": "deno run -A scripts/build_npm.ts" "npm": "deno run -A scripts/build_npm.ts"
}, },
"exclude": ["npm"], "exclude": ["npm"]
"imports": {
"~/": "./"
}
} }

4
mod.ts
View file

@ -1,2 +1,2 @@
export * from "~/src/core/studentClient.ts"; export * from "./src/core/studentClient.ts";
export * from "~/src/core/parentClient.ts"; export * from "./src/core/parentClient.ts";

View file

@ -17,7 +17,7 @@ import type {
LessonsResponse, LessonsResponse,
PupilFieldsResponse, PupilFieldsResponse,
} from "../types.ts"; } from "../types.ts";
import { PING_INTERVAL } from "~/src/utils/consts.ts"; import { PING_INTERVAL } from "../utils/consts.ts";
/** /**
* Shared client for both parent and student. This is not exported and should not be used directly * Shared client for both parent and student. This is not exported and should not be used directly

View file

@ -1,8 +1,8 @@
import type { GetPupilsResponse } from "../types.ts"; import type { GetPupilsResponse } from "../types.ts";
import { BaseClient } from "~/src/core/baseClient.ts"; import { BaseClient } from "../core/baseClient.ts";
import { API_BASE_PARENT, BASE_URL } from "~/src/utils/consts.ts"; import { API_BASE_PARENT, BASE_URL } from "../utils/consts.ts";
import { parseCookies } from "~/src/utils/utils.ts"; import { parseCookies } from "../utils/utils.ts";
/** /**
* Parent Client * Parent Client
*/ */

View file

@ -1,5 +1,5 @@
import { assertRejects } from "~/deps_dev.ts"; import { assertRejects } from "../../deps_dev.ts";
import { ParentClient } from "~/src/core/parentClient.ts"; import { ParentClient } from "../core/parentClient.ts";
Deno.test("Throws when no email is provided", async () => { Deno.test("Throws when no email is provided", async () => {
const client = new ParentClient("", "password"); const client = new ParentClient("", "password");

View file

@ -1,7 +1,7 @@
import { API_BASE_STUDENT, BASE_URL } from "~/src/utils/consts.ts"; import { API_BASE_STUDENT, BASE_URL } from "../utils/consts.ts";
import { BaseClient } from "~/src/core/baseClient.ts"; import { BaseClient } from "../core/baseClient.ts";
import { parseCookies } from "~/src/utils/utils.ts"; import { parseCookies } from "../utils/utils.ts";
import { RewardPurchaseResponse, RewardsResponse } from "~/src/types.ts"; import { RewardPurchaseResponse, RewardsResponse } from "../types.ts";
/** /**
* Student Client * Student Client

View file

@ -1,5 +1,5 @@
import { assertRejects } from "~/deps_dev.ts"; import { assertRejects } from "../../deps_dev.ts";
import { StudentClient } from "~/src/core/studentClient.ts"; import { StudentClient } from "../core/studentClient.ts";
Deno.test("Throws when no student code is provided", async () => { Deno.test("Throws when no student code is provided", async () => {
const client = new StudentClient(""); const client = new StudentClient("");

View file

@ -1,4 +1,4 @@
import { assertEquals, assertExists } from "~/deps_dev.ts"; import { assertEquals, assertExists } from "../../deps_dev.ts";
import { parseCookies } from "./utils.ts"; import { parseCookies } from "./utils.ts";
Deno.test("Parses simple cookie", () => { Deno.test("Parses simple cookie", () => {
const cookie = const cookie =