File tree 5 files changed +36
-3
lines changed
5 files changed +36
-3
lines changed Original file line number Diff line number Diff line change 71
71
"react-json-view" : " ^1.21.3" ,
72
72
"rollup" : " ^2.41.2" ,
73
73
"rollup-plugin-delete" : " ^2.0.0" ,
74
+ "rollup-plugin-dts" : " ^4.2.1" ,
74
75
"rollup-plugin-postcss" : " ^4.0.0" ,
75
76
"rollup-plugin-typescript2" : " ^0.27.1" ,
76
77
"sass" : " ^1.49.9" ,
Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ import path from "path"
8
8
import json from "@rollup/plugin-json"
9
9
import del from "rollup-plugin-delete"
10
10
import replace from "@rollup/plugin-replace"
11
+ import dts from "rollup-plugin-dts"
11
12
import { nodeResolve } from "@rollup/plugin-node-resolve"
12
13
// import { terser } from "rollup-plugin-terser"
13
14
import commonjs from "@rollup/plugin-commonjs"
@@ -72,6 +73,12 @@ export default function makeConfig(commandOptions) {
72
73
} ) ,
73
74
] ,
74
75
} ,
76
+ {
77
+ input : `src/index.tsx` ,
78
+ output : [ { file : `./dist/index.d.ts` , format : "es" } ] ,
79
+ external : [ ...remarkExternal , "shiki" ] ,
80
+ plugins : [ dts ( ) ] ,
81
+ } ,
75
82
// for the browser esm we need to replace shiki with shiki/dist/index.browser.mjs
76
83
// https://github.com/shikijs/shiki/issues/131#issuecomment-1094281851
77
84
{
@@ -125,5 +132,13 @@ export default function makeConfig(commandOptions) {
125
132
} ) ,
126
133
] ,
127
134
} ,
135
+ {
136
+ input : `src/components.tsx` ,
137
+ output : [
138
+ { file : `./dist/components.d.ts` , format : "es" } ,
139
+ ] ,
140
+ external : clientExternal ,
141
+ plugins : [ dts ( ) ] ,
142
+ } ,
128
143
]
129
144
}
Original file line number Diff line number Diff line change 5
5
EditorProps ,
6
6
EditorStep ,
7
7
} from "../mini-editor"
8
- import { CodeHikeConfig } from "remark/config"
8
+ import { CodeHikeConfig } from "../ remark/config"
9
9
10
10
export function Code (
11
11
props : EditorProps & Partial < CodeHikeConfig >
Original file line number Diff line number Diff line change 12
12
" esnext"
13
13
],
14
14
"importHelpers" : true ,
15
- "declaration" : true ,
15
+ "declaration" : false ,
16
16
"sourceMap" : true ,
17
17
"strict" : false ,
18
18
"noUnusedLocals" : false ,
39
39
"forceConsistentCasingInFileNames" : true ,
40
40
"noEmit" : true ,
41
41
"isolatedModules" : true ,
42
- "incremental" : true
42
+ "incremental" : true ,
43
+ "tsBuildInfoFile" : " ./dist/tsbuildinfo.json"
43
44
},
44
45
"exclude" : [
45
46
" node_modules"
Original file line number Diff line number Diff line change @@ -10399,6 +10399,13 @@ magic-string@^0.25.3, magic-string@^0.25.7:
10399
10399
dependencies:
10400
10400
sourcemap-codec "^1.4.8"
10401
10401
10402
+ magic-string@^0.26.1:
10403
+ version "0.26.2"
10404
+ resolved "https://registry.yarnpkg.com/magic-string/-/magic-string-0.26.2.tgz#5331700e4158cd6befda738bb6b0c7b93c0d4432"
10405
+ integrity sha512-NzzlXpclt5zAbmo6h6jNc8zl2gNRGHvmsZW4IvZhTC4W7k4OlLP+S5YLussa/r3ixNT66KOQfNORlXHSOy/X4A==
10406
+ dependencies:
10407
+ sourcemap-codec "^1.4.8"
10408
+
10402
10409
make-dir@^1.0.0:
10403
10410
version "1.3.0"
10404
10411
resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-1.3.0.tgz#79c1033b80515bd6d24ec9933e860ca75ee27f0c"
@@ -14303,6 +14310,15 @@ rollup-plugin-delete@^2.0.0:
14303
14310
dependencies:
14304
14311
del "^5.1.0"
14305
14312
14313
+ rollup-plugin-dts@^4.2.1:
14314
+ version "4.2.1"
14315
+ resolved "https://registry.yarnpkg.com/rollup-plugin-dts/-/rollup-plugin-dts-4.2.1.tgz#c17968a0f7c5ae70a9e0ab37e715f3ef63da01c7"
14316
+ integrity sha512-eaxQZNUJ5iQcxNGlpJ1CUgG4OSVqWjDZ3nNSWBIoGrpcote2aNphSe1RJOaSYkb8dwn3o+rYm1vvld/5z3EGSQ==
14317
+ dependencies:
14318
+ magic-string "^0.26.1"
14319
+ optionalDependencies:
14320
+ "@babel/code-frame" "^7.16.7"
14321
+
14306
14322
rollup-plugin-inject@^3.0.0:
14307
14323
version "3.0.2"
14308
14324
resolved "https://registry.yarnpkg.com/rollup-plugin-inject/-/rollup-plugin-inject-3.0.2.tgz#e4233855bfba6c0c12a312fd6649dff9a13ee9f4"
You can’t perform that action at this time.
0 commit comments