File tree 13 files changed +624
-299
lines changed
13 files changed +624
-299
lines changed Original file line number Diff line number Diff line change 5
5
{ "repo" : " rehype-pretty/rehype-pretty-code" }
6
6
],
7
7
"commit" : false ,
8
- "fixed" : [[ " rehype-pretty-code " , " @rehype-pretty/transformers " ] ],
9
- "linked" : [],
8
+ "fixed" : [],
9
+ "linked" : [[ " rehype-pretty-code " , " @rehype-pretty/transformers " ] ],
10
10
"access" : " public" ,
11
11
"baseBranch" : " master" ,
12
12
"updateInternalDependencies" : " patch" ,
13
- "ignore" : [" website" ],
13
+ "ignore" : [" website" , " example-* " ],
14
14
"bumpVersionsWithWorkspaceProtocolOnly" : true ,
15
15
"___experimentalUnsafeOptions_WILL_CHANGE_IN_PATCH" : {
16
16
"onlyUpdatePeerDependentsWhenOutOfRange" : true
Original file line number Diff line number Diff line change 1
1
import mdx from '@astrojs/mdx' ;
2
2
import tailwind from '@astrojs/tailwind' ;
3
3
import { defineConfig } from 'astro/config' ;
4
- import rehypePrettyCode from 'rehype-pretty-code' ;
4
+ import { rehypePrettyCode } from 'rehype-pretty-code' ;
5
5
import moonlightTheme from './public/theme/moonlight-ii.json' ;
6
6
import { transformerCopyButton } from '@rehype-pretty/transformers' ;
7
7
Original file line number Diff line number Diff line change 12
12
"clean" : " rm -rf dist"
13
13
},
14
14
"dependencies" : {
15
- "@astrojs/mdx" : " ^2.3.1 " ,
15
+ "@astrojs/mdx" : " ^3.0.0 " ,
16
16
"@astrojs/tailwind" : " ^5.1.0" ,
17
17
"@rehype-pretty/transformers" : " workspace:*" ,
18
- "astro" : " ^4.7.1 " ,
18
+ "astro" : " ^4.8.3 " ,
19
19
"rehype-pretty-code" : " workspace:*" ,
20
- "shiki" : " ^1.4.0 " ,
20
+ "shiki" : " ^1.5.1 " ,
21
21
"tailwindcss" : " ^3.4.3"
22
22
},
23
23
"devDependencies" : {
24
24
"@astrojs/check" : " ^0.6.0" ,
25
- "@types/node" : " ^20.12.10 " ,
25
+ "@types/node" : " ^20.12.11 " ,
26
26
"typescript" : " ^5.4.5"
27
27
}
28
28
}
Original file line number Diff line number Diff line change
1
+ /// <reference path="../.astro/types.d.ts" />
1
2
/// <reference types="astro/client" />
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " example-cdn" ,
3
+ "version" : " 0.0.0" ,
4
+ "type" : " module" ,
5
+ "private" : true ,
3
6
"scripts" : {
4
7
"dev" : " pnpm dlx serve@latest ." ,
5
8
"start" : " pnpm dlx serve@latest ."
Original file line number Diff line number Diff line change 20
20
},
21
21
"devDependencies" : {
22
22
"@sveltejs/adapter-static" : " ^3.0.1" ,
23
- "@sveltejs/kit" : " ^2.5.7 " ,
23
+ "@sveltejs/kit" : " ^2.5.8 " ,
24
24
"@sveltejs/vite-plugin-svelte" : " ^3.1.0" ,
25
25
"magic-string" : " ^0.30.10" ,
26
26
"svelte" : " 5.0.0-next.123" ,
Original file line number Diff line number Diff line change 24
24
"@biomejs/biome" : " ^1.7.3" ,
25
25
"@changesets/changelog-github" : " ^0.5.0" ,
26
26
"@changesets/cli" : " ^2.27.1" ,
27
- "@types/bun" : " ^1.1.1 " ,
28
- "@types/node" : " ^20.12.10 " ,
29
- "bun" : " ^1.1.7 " ,
27
+ "@types/bun" : " ^1.1.2 " ,
28
+ "@types/node" : " ^20.12.11 " ,
29
+ "bun" : " ^1.1.8 " ,
30
30
"simple-git-hooks" : " ^2.11.1" ,
31
31
"turbo" : " ^1.13.3" ,
32
32
"typescript" : " ^5.4.5"
Original file line number Diff line number Diff line change 36
36
},
37
37
"devDependencies" : {
38
38
"@arethetypeswrong/cli" : " ^0.15.3" ,
39
- "@shikijs/transformers" : " ^1.4.0 " ,
40
- "@types/node" : " ^20.12.10 " ,
39
+ "@shikijs/transformers" : " ^1.5.1 " ,
40
+ "@types/node" : " ^20.12.11 " ,
41
41
"hast-util-to-html" : " ^9.0.1" ,
42
42
"mdast-util-to-hast" : " ^13.1.0" ,
43
43
"prettier" : " ^3.2.5" ,
44
44
"remark" : " ^15.0.1" ,
45
- "shiki" : " ^1.4.0 " ,
45
+ "shiki" : " ^1.5.1 " ,
46
46
"tsup" : " ^8.0.2" ,
47
- "tsx" : " ^4.9.3 " ,
47
+ "tsx" : " ^4.10.2 " ,
48
48
"typescript" : " ^5.4.5" ,
49
49
"vite" : " ^5.2.11" ,
50
50
"vitest" : " ^1.6.0"
Original file line number Diff line number Diff line change @@ -164,7 +164,9 @@ function apply(
164
164
const globalHighlighterCache = new Map < string , Promise < Highlighter > > ( ) ;
165
165
const hastParser = unified ( ) . use ( rehypeParse , { fragment : true } ) ;
166
166
167
- export default function rehypePrettyCode (
167
+ export default rehypePrettyCode ;
168
+
169
+ export function rehypePrettyCode (
168
170
options : Options = { } ,
169
171
) : void | Transformer < Root , Root > {
170
172
const {
Original file line number Diff line number Diff line change 1
1
> [ !NOTE]
2
- > Currently in ** beta ** .
2
+ > Currently in ** development ** .
3
3
4
4
# ` @rehype-pretty/transformers `
5
5
6
6
[ ![ JSR] ( https://jsr.io/badges/@rehype-pretty/transformers )] ( https://jsr.io/@rehype-pretty/transformers )
7
7
[ ![ JSR] ( https://jsr.io/badges/@rehype-pretty/transformers/score )] ( https://jsr.io/@rehype-pretty/transformers )
8
8
9
9
``` sh
10
- npm install @rehype-pretty/transformers
10
+ npx jsr add @rehype-pretty/transformers
11
11
```
12
12
13
13
## Available Transformers
Original file line number Diff line number Diff line change 3
3
"description" : " Shiki transformer that adds a copy button to code blocks" ,
4
4
"version" : " 0.13.1" ,
5
5
"homepage" : " https://rehype-pretty.pages.dev" ,
6
- "private" : true ,
7
6
"type" : " module" ,
8
7
"main" : " ./src/index.ts" ,
9
8
"module" : " ./src/index.ts" ,
47
46
},
48
47
"devDependencies" : {
49
48
"@arethetypeswrong/cli" : " ^0.15.3" ,
50
- "@types/node" : " ^20.12.10 " ,
49
+ "@types/node" : " ^20.12.11 " ,
51
50
"tsup" : " ^8.0.2" ,
52
- "tsx" : " ^4.9.3 " ,
51
+ "tsx" : " ^4.10.2 " ,
53
52
"typescript" : " ^5.4.5"
54
53
},
55
54
"engines" : {
You can’t perform that action at this time.
0 commit comments