Skip to content

Commit

Permalink
feat: 🏷️ generate .d.ts types
Browse files Browse the repository at this point in the history
  • Loading branch information
okineadev committed Dec 10, 2024
1 parent 8a2c7a2 commit 8fc9f19
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 3 deletions.
Binary file modified bun.lockb
Binary file not shown.
9 changes: 6 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,14 @@
},
"module": "src/index.tsx",
"main": "dist/index.js",
"types": "index.d.ts",
"scripts": {
"lint": "biome check --fix",
"format": "biome format --write .",
"test": "FORCE_COLOR=true bun test",
"preversion": "bun run test && bun run format && git add .",
"build": "bun build ./src/index.tsx --minify --outdir ./dist --target node --external=yoga-wasm-web",
"build": "bun build ./src/index.tsx --minify --outdir ./dist --target node --external=yoga-wasm-web",
"postbuild": "bunx --bun tsc -p ./tsconfig.declarations.json",
"prepublishOnly": "bun run build",
"prepare": "husky",
"examples:basic": "bun ./examples/basic.tsx",
Expand All @@ -38,9 +40,10 @@
"@types/bun": "^1.1.14",
"@types/react": "^18.3.14",
"changelogen": "^0.5.7",
"ink-testing-library": "^4.0.0",
"husky": "^9.1.6",
"lint-staged": "^15.2.10"
"ink-testing-library": "^4.0.0",
"lint-staged": "^15.2.10",
"typescript": "^5.7.2"
},
"lint-staged": {
"*": "bun run format"
Expand Down
11 changes: 11 additions & 0 deletions tsconfig.declarations.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"declaration": true,
"emitDeclarationOnly": true,
"noEmit": false,
"declarationDir": "./dist",
"declarationMap": true
},
"include": ["src/index.tsx"]
}

0 comments on commit 8fc9f19

Please sign in to comment.