Skip to content

Commit 8490c79

Browse files
committed
chore: fix build script, add tsconfig
1 parent 49b0a90 commit 8490c79

File tree

4 files changed

+28
-5
lines changed

4 files changed

+28
-5
lines changed

build.config.ts

-3
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,4 @@ export default defineBuildConfig({
1313
},
1414
},
1515
},
16-
externals: [
17-
'hast',
18-
],
1916
})

package.json

+1-2
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,7 @@
3131
"build": "unbuild",
3232
"dev": "unbuild --stub",
3333
"test": "vitest run",
34-
"test:coverage": "vitest run --coverage",
35-
"prepublishOnly": "nr build"
34+
"test:coverage": "vitest run --coverage"
3635
},
3736
"dependencies": {
3837
"shiki": "^1.6.3"

test/line-highlight.test.ts

+1
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ describe('transformerLineHighlight', () => {
9494

9595
for (const item of fixtures) {
9696
const name = Object.keys(item.options).map(k => {
97+
// @ts-ignore
9798
return `${k}=${item.options[k]}`
9899
}).join(' ')
99100
it(name, async () => {

tsconfig.json

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
{
2+
"compilerOptions": {
3+
"target": "esnext",
4+
"lib": ["esnext", "DOM"],
5+
"rootDir": ".",
6+
"module": "esnext",
7+
"moduleResolution": "Bundler",
8+
"resolveJsonModule": true,
9+
"allowJs": true,
10+
"strict": true,
11+
"strictNullChecks": true,
12+
"noEmit": true,
13+
"preserveValueImports": false,
14+
"esModuleInterop": true,
15+
"skipDefaultLibCheck": true,
16+
"skipLibCheck": true
17+
},
18+
"include": [
19+
"**/*.ts",
20+
"**/*.mjs"
21+
],
22+
"exclude": [
23+
"node_modules/**",
24+
"dist/**"
25+
]
26+
}

0 commit comments

Comments
 (0)