Skip to content

Commit

Permalink
chore: use JSR
Browse files Browse the repository at this point in the history
  • Loading branch information
lucacasonato committed Feb 6, 2024
1 parent 4dafd97 commit a3b62af
Show file tree
Hide file tree
Showing 14 changed files with 30,932 additions and 54 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
cov_profile
deno.lock
28 changes: 26 additions & 2 deletions deno.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,29 @@
{
"name": "@deno/gfm",
"version": "0.6.0",
"export": "./mod.ts",
"imports": {
"emoji": "./vendor/emoji/mod.ts",
"marked": "npm:marked@^11.1",
"github-slugger": "npm:github-slugger@^2.0",
"marked-alert": "npm:marked-alert@^2.0",
"marked-footnote": "npm:marked-footnote@^1.2",
"marked-gfm-heading-id": "npm:marked-gfm-heading-id@^3.1",
"prismjs": "npm:prismjs@^1.29",
"sanitize-html": "npm:sanitize-html@^2.11",
"he": "npm:he@^1.2",
"katex": "npm:katex@^0.16",
"@std/assert": "jsr:@std/assert@^0.214"
},
"compilerOptions": {
"lib": [
"dom",
"dom.iterable",
"dom.asynciterable",
"deno.ns",
"deno.unstable"
]
},
"tasks": {
"build": "deno run --allow-read --allow-write --allow-net --allow-run --allow-env ./style/patch.ts && deno fmt",
"check:types": "deno check **/*.ts",
Expand All @@ -11,6 +36,5 @@
},
"fmt": {
"exclude": ["./test/fixtures/alerts.md", "./test/fixtures/lineBreaks.md"]
},
"lock": false
}
}
26 changes: 0 additions & 26 deletions deps.ts

This file was deleted.

23 changes: 11 additions & 12 deletions mod.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
import {
emojify,
gfmHeadingId,
GitHubSlugger,
htmlEscape,
katex,
Marked,
markedAlert,
markedFootnote,
Prism,
sanitizeHtml,
} from "./deps.ts";
import { emojify } from "emoji";
import * as Marked from "marked";
import GitHubSlugger from "github-slugger";
import markedAlert from "marked-alert";
import markedFootnote from "marked-footnote";
import { gfmHeadingId } from "marked-gfm-heading-id";
import Prism from "prismjs";
import sanitizeHtml from "sanitize-html";
import htmlEscape from "he";
import katex from "katex";

import { CSS, KATEX_CLASSES, KATEX_CSS } from "./style.js";
export { CSS, KATEX_CSS, Marked };

Expand Down
2 changes: 1 addition & 1 deletion test/server_test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { assert, assertEquals } from "./test_deps.ts";
import { assert, assertEquals } from "@std/assert";
import { browserTest } from "./test_utils.ts";

Deno.test("basic md table with dollar signs", async () => {
Expand Down
3 changes: 2 additions & 1 deletion test/test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { assertEquals, assertStringIncludes, DOMParser } from "./test_deps.ts";
import { assertEquals, assertStringIncludes } from "@std/assert";
import { DOMParser } from "https://deno.land/x/[email protected]/deno-dom-wasm.ts";
import { render, Renderer } from "../mod.ts";

Deno.test("Basic markdown", async () => {
Expand Down
11 changes: 0 additions & 11 deletions test/test_deps.ts

This file was deleted.

5 changes: 4 additions & 1 deletion test/test_utils.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
import { Page, puppeteer } from "./test_deps.ts";
import {
default as puppeteer,
Page,
} from "https://deno.land/x/[email protected]/mod.ts";
import { CSS, render, RenderOptions } from "../mod.ts";

type TestCase = {
Expand Down
22 changes: 22 additions & 0 deletions vendor/emoji/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
MIT License

Copyright (c) 2014 Daniel Bugl
Copyright (c) 2020-2023 the denosaurs team

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Loading

0 comments on commit a3b62af

Please sign in to comment.