Skip to content

Commit

Permalink
generate types file on build
Browse files Browse the repository at this point in the history
  • Loading branch information
bgonp committed Jan 27, 2021
1 parent ac01c5e commit 0e1c2b2
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 6 deletions.
8 changes: 7 additions & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 10 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,21 @@
{
"name": "custom-hooks",
"version": "1.0.0",
"version": "0.1.0",
"description": "",
"main": "dist/index.js",
"main": "./build/index.js",
"types": "./build/index.d.ts",
"scripts": {
"prepare": "npm run build",
"build": "node esbuild.js"
"build": "node esbuild.js && tsc src/index.ts --declaration --emitDeclarationOnly --outFile build/index.d.ts --lib es2015,dom"
},
"repository": {
"type": "git",
"url": "git+https://github.com/bgonp/custom-hooks.git"
},
"author": "",
"author": {
"name": "Borja González",
"url": "https://github.com/bgonp"
},
"license": "See LICENSE file",
"bugs": {
"url": "https://github.com/bgonp/custom-hooks/issues"
Expand All @@ -24,6 +28,7 @@
"devDependencies": {
"@types/react": "~17.0.0",
"@types/react-dom": "~17.0.0",
"esbuild": "~0.8.36"
"esbuild": "~0.8.36",
"typescript": "~4.1.3"
}
}

0 comments on commit 0e1c2b2

Please sign in to comment.