diff --git a/package-lock.json b/package-lock.json index 04f86f4..d00b571 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "custom-hooks", - "version": "1.0.0", + "version": "0.1.0", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -86,6 +86,12 @@ "loose-envify": "^1.1.0", "object-assign": "^4.1.1" } + }, + "typescript": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.1.3.tgz", + "integrity": "sha512-B3ZIOf1IKeH2ixgHhj6la6xdwR9QrLC5d1VKeCSY4tvkqhF2eqd9O7txNlS0PO3GrBAFIdr3L1ndNwteUbZLYg==", + "dev": true } } } diff --git a/package.json b/package.json index 555a81c..4421415 100644 --- a/package.json +++ b/package.json @@ -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" @@ -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" } }