Skip to content

Commit

Permalink
feat: svg-chord d.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
liningzhu committed Mar 1, 2024
1 parent c7dc1d7 commit 00326fc
Show file tree
Hide file tree
Showing 4 changed files with 328 additions and 9 deletions.
7 changes: 4 additions & 3 deletions packages/svg-chord/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,17 @@
"module": "./dist/svg-chord.js",
"types": "./dist/index.d.ts",
"exports": {
"types": "./index.d.ts",
"types": "./dist/index.d.ts",
"import": "./dist/svg-chord.js",
"require": "./dist/svg-chord.umd.cjs"
},
"scripts": {
"dev": "vite",
"build": "vite build && tsc"
"build": "tsc && vite build"
},
"devDependencies": {
"typescript": "^5.3.3",
"vite": "^5.0.10"
"vite": "^5.0.10",
"vite-plugin-dts": "^3.7.3"
}
}
12 changes: 6 additions & 6 deletions packages/svg-chord/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,19 @@
"moduleResolution": "Bundler",
"allowImportingTsExtensions": true,
"resolveJsonModule": true,
// "isolatedModules": true,
// "noEmit": true,
"isolatedModules": true,
"noEmit": true,

/* Linting */
"strict": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"noFallthroughCasesInSwitch": true,

"emitDeclarationOnly": true,
// "emitDeclarationOnly": true,
"declaration": true,
// "declarationDir": "dist",
"outFile": "dist/index.d.ts"
"declarationDir": "dist",
// "outFile": "dist/index.d.ts"
},
"include": ["src"]
"include": ["src", "lib"]
}
6 changes: 6 additions & 0 deletions packages/svg-chord/vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { defineConfig } from 'vite'
import dts from 'vite-plugin-dts'

export default defineConfig({
build: {
Expand All @@ -16,4 +17,9 @@ export default defineConfig({
},
},
},
plugins: [
dts({
entryRoot: './lib',
}),
],
})
Loading

0 comments on commit 00326fc

Please sign in to comment.