Skip to content

Commit a3b62af

Browse files
committed
chore: use JSR
1 parent 4dafd97 commit a3b62af

14 files changed

+30932
-54
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
cov_profile
2+
deno.lock

deno.json

+26-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,29 @@
11
{
2+
"name": "@deno/gfm",
3+
"version": "0.6.0",
4+
"export": "./mod.ts",
5+
"imports": {
6+
"emoji": "./vendor/emoji/mod.ts",
7+
"marked": "npm:marked@^11.1",
8+
"github-slugger": "npm:github-slugger@^2.0",
9+
"marked-alert": "npm:marked-alert@^2.0",
10+
"marked-footnote": "npm:marked-footnote@^1.2",
11+
"marked-gfm-heading-id": "npm:marked-gfm-heading-id@^3.1",
12+
"prismjs": "npm:prismjs@^1.29",
13+
"sanitize-html": "npm:sanitize-html@^2.11",
14+
"he": "npm:he@^1.2",
15+
"katex": "npm:katex@^0.16",
16+
"@std/assert": "jsr:@std/assert@^0.214"
17+
},
18+
"compilerOptions": {
19+
"lib": [
20+
"dom",
21+
"dom.iterable",
22+
"dom.asynciterable",
23+
"deno.ns",
24+
"deno.unstable"
25+
]
26+
},
227
"tasks": {
328
"build": "deno run --allow-read --allow-write --allow-net --allow-run --allow-env ./style/patch.ts && deno fmt",
429
"check:types": "deno check **/*.ts",
@@ -11,6 +36,5 @@
1136
},
1237
"fmt": {
1338
"exclude": ["./test/fixtures/alerts.md", "./test/fixtures/lineBreaks.md"]
14-
},
15-
"lock": false
39+
}
1640
}

deps.ts

-26
This file was deleted.

mod.ts

+11-12
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
1-
import {
2-
emojify,
3-
gfmHeadingId,
4-
GitHubSlugger,
5-
htmlEscape,
6-
katex,
7-
Marked,
8-
markedAlert,
9-
markedFootnote,
10-
Prism,
11-
sanitizeHtml,
12-
} from "./deps.ts";
1+
import { emojify } from "emoji";
2+
import * as Marked from "marked";
3+
import GitHubSlugger from "github-slugger";
4+
import markedAlert from "marked-alert";
5+
import markedFootnote from "marked-footnote";
6+
import { gfmHeadingId } from "marked-gfm-heading-id";
7+
import Prism from "prismjs";
8+
import sanitizeHtml from "sanitize-html";
9+
import htmlEscape from "he";
10+
import katex from "katex";
11+
1312
import { CSS, KATEX_CLASSES, KATEX_CSS } from "./style.js";
1413
export { CSS, KATEX_CSS, Marked };
1514

test/server_test.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { assert, assertEquals } from "./test_deps.ts";
1+
import { assert, assertEquals } from "@std/assert";
22
import { browserTest } from "./test_utils.ts";
33

44
Deno.test("basic md table with dollar signs", async () => {

test/test.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
import { assertEquals, assertStringIncludes, DOMParser } from "./test_deps.ts";
1+
import { assertEquals, assertStringIncludes } from "@std/assert";
2+
import { DOMParser } from "https://deno.land/x/[email protected]/deno-dom-wasm.ts";
23
import { render, Renderer } from "../mod.ts";
34

45
Deno.test("Basic markdown", async () => {

test/test_deps.ts

-11
This file was deleted.

test/test_utils.ts

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
import { Page, puppeteer } from "./test_deps.ts";
1+
import {
2+
default as puppeteer,
3+
Page,
4+
} from "https://deno.land/x/[email protected]/mod.ts";
25
import { CSS, render, RenderOptions } from "../mod.ts";
36

47
type TestCase = {

vendor/emoji/LICENSE

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
MIT License
2+
3+
Copyright (c) 2014 Daniel Bugl
4+
Copyright (c) 2020-2023 the denosaurs team
5+
6+
Permission is hereby granted, free of charge, to any person obtaining a copy
7+
of this software and associated documentation files (the "Software"), to deal
8+
in the Software without restriction, including without limitation the rights
9+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10+
copies of the Software, and to permit persons to whom the Software is
11+
furnished to do so, subject to the following conditions:
12+
13+
The above copyright notice and this permission notice shall be included in all
14+
copies or substantial portions of the Software.
15+
16+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22+
SOFTWARE.

0 commit comments

Comments
 (0)