mirror of
https://github.com/classchartsapi/classcharts-api-js.git
synced 2026-05-14 11:58:13 +00:00
chore: move deno dev deps to deps file && use import map
This commit is contained in:
parent
c5e7b3f24e
commit
a022c8a8ad
8 changed files with 20 additions and 16 deletions
|
|
@ -2,5 +2,8 @@
|
|||
"tasks": {
|
||||
"npm": "deno run -A scripts/build_npm.ts"
|
||||
},
|
||||
"exclude": ["npm"]
|
||||
"exclude": ["npm"],
|
||||
"imports": {
|
||||
"~/": "./"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
5
deps_dev.ts
Normal file
5
deps_dev.ts
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
export {
|
||||
assertEquals,
|
||||
assertExists,
|
||||
assertRejects,
|
||||
} from "https://deno.land/std@0.200.0/assert/mod.ts";
|
||||
|
|
@ -13,6 +13,7 @@ await build({
|
|||
path: "./src/types.ts",
|
||||
}],
|
||||
outDir: "./npm",
|
||||
importMap: "./deno.jsonc",
|
||||
shims: {
|
||||
deno: true,
|
||||
},
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ import type {
|
|||
HomeworksResponse,
|
||||
LessonsResponse,
|
||||
} from "../types.ts";
|
||||
import { PING_INTERVAL } from "../utils/consts.ts";
|
||||
import { PING_INTERVAL } from "~/src/utils/consts.ts";
|
||||
|
||||
/**
|
||||
* Shared client for both parent and student. This is not exported and should not be used directly
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
import type { GetPupilsResponse } from "../types.ts";
|
||||
|
||||
import { BaseClient } from "./baseClient.ts";
|
||||
import { API_BASE_PARENT, BASE_URL } from "../utils/consts.ts";
|
||||
import { parseCookies } from "../utils/utils.ts";
|
||||
import { BaseClient } from "~/src/core/baseClient.ts";
|
||||
import { API_BASE_PARENT, BASE_URL } from "~/src/utils/consts.ts";
|
||||
import { parseCookies } from "~/src/utils/utils.ts";
|
||||
/**
|
||||
* Parent Client
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import { API_BASE_STUDENT, BASE_URL } from "../utils/consts.ts";
|
||||
import { BaseClient } from "./baseClient.ts";
|
||||
import { parseCookies } from "../utils/utils.ts";
|
||||
import { API_BASE_STUDENT, BASE_URL } from "~/src/utils/consts.ts";
|
||||
import { BaseClient } from "~/src/core/baseClient.ts";
|
||||
import { parseCookies } from "~/src/utils/utils.ts";
|
||||
|
||||
/**
|
||||
* Student Client
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
import { assertRejects } from "https://deno.land/std@0.200.0/assert/mod.ts";
|
||||
|
||||
import { StudentClient } from "./studentClient.ts";
|
||||
import { assertRejects } from "~/deps_dev.ts";
|
||||
import { StudentClient } from "~/src/core/studentClient.ts";
|
||||
|
||||
Deno.test("Throws when no student code is provided", async () => {
|
||||
const client = new StudentClient("");
|
||||
|
|
|
|||
|
|
@ -1,8 +1,4 @@
|
|||
import {
|
||||
assertEquals,
|
||||
assertExists,
|
||||
} from "https://deno.land/std@0.200.0/assert/mod.ts";
|
||||
|
||||
import { assertEquals, assertExists } from "~/deps_dev.ts";
|
||||
import { parseCookies } from "./utils.ts";
|
||||
Deno.test("Parses simple cookie", () => {
|
||||
const cookie =
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue