-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdeps.ts
52 lines (45 loc) · 1.22 KB
/
deps.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
import * as esbuild from "npm:esbuild@^0.23.0"
import { compile as compileMdx_ } from "npm:@mdx-js/[email protected]"
import { renderToStaticMarkup } from "npm:react-dom@^18.2.0/server"
import remarkGfm from 'npm:remark-gfm@^1.0.0'
import { denoLoaderPlugin, denoResolverPlugin } from "jsr:@luca/esbuild-deno-loader@^0.11.1";
import React from "npm:react@^18.2.0";
import {parseArgs} from "jsr:@std/cli@^0.224.7/parse-args";
import { isAbsolute, join, resolve, normalize, dirname, extname, parse } from 'jsr:@std/path@^0.225.2'
import { ensureDir } from 'jsr:@std/fs@^1'
import init, { transform } from "npm:lightningcss-wasm@^1.29.1";
import { parse as parseJsonc } from "jsr:@std/jsonc@^1";
import { contentType } from "jsr:@std/media-types@^1";
const compileMdx = async (text: string) => {
return compileMdx_(text, {
remarkPlugins: [remarkGfm],
})
}
export {
// esbuild
esbuild,
// mdx-js
compileMdx,
// esbuild_deno_loader
denoLoaderPlugin,
denoResolverPlugin,
// deno std
parseArgs,
parseJsonc,
contentType,
// React
React,
renderToStaticMarkup,
// files
isAbsolute,
join,
resolve,
normalize,
dirname,
extname,
parse,
ensureDir,
// css
init as initCss,
transform as transformCss,
}