@fedify/markdown-it-mention@0.3.0Built and signed on GitHub ActionsBuilt and signed on GitHub Actions
Built and signed on GitHub Actions
A markdown-it plugin that parses and renders Mastodon-style @mentions
This package works with Cloudflare Workers, Node.js, Deno, Bun, Browsers




JSR Score
100%
Published
9 months ago (0.3.0)
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172import { build, emptyDir } from "jsr:@deno/dnt@^0.41.1"; import metadata from "./deno.json" with { type: "json" }; await emptyDir("./npm"); const importMap = ".dnt-import-map.json"; await Deno.writeTextFile( importMap, JSON.stringify({ imports: { ...metadata.imports, "markdown-it": metadata.imports["markdown-it-impl"], "markdown-it/": `npm:/${ metadata.imports["markdown-it-impl"].substring(4) }/`, }, }), ); await build({ package: { // package.json properties name: "@fedify/markdown-it-mention", version: Deno.args[0] ?? metadata.version, description: "A markdown-it plugin that parses and renders Mastodon-style @mentions.", keywords: [ "markdown", "markdown-it", "markdown-it-plugin", "Mastodon", "mention", "fediverse", ], license: "MIT", author: { name: "Hong Minhee", email: "hong@minhee.org", url: "https://hongminhee.org/", }, homepage: "https://github.com/fedify-dev/markdown-it-mention", repository: { type: "git", url: "git+https://github.com/fedify-dev/markdown-it-mention.git", }, bugs: { url: "https://github.com/fedify-dev/markdown-it-mention/issues", }, funding: [ "https://github.com/sponsors/dahlia", ], devDependencies: { "@types/markdown-it": "^14.1.1", }, }, outDir: "./npm", entryPoints: ["./mod.ts"], importMap, shims: { deno: true, }, typeCheck: "both", declaration: "separate", declarationMap: true, test: true, async postBuild() { await Deno.copyFile("LICENSE", "npm/LICENSE"); await Deno.copyFile("README.md", "npm/README.md"); }, }); // cSpell: ignore Minhee