Skip to content

Commit

Permalink
Generate type definition on publish
Browse files Browse the repository at this point in the history
  • Loading branch information
trinhpham committed Jun 7, 2023
1 parent b1118eb commit 7acfcc8
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ hack.*
node_modules
package-lock.json
tmp
types
8 changes: 6 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@
"version": "1.0.2",
"main": "./lib",
"files": [
"./lib"
"./lib",
"./types"
],
"types": "types/index.d.ts",
"dependencies": {
"papi": "^1.1.0"
},
Expand All @@ -20,9 +22,11 @@
"nyc": "^15.1.0",
"prettier": "^2.7.1",
"should": "^13.2.1",
"sinon": "^14.0.0"
"sinon": "^14.0.0",
"typescript": "^5.1.3"
},
"scripts": {
"prepublishOnly": "tsc",
"format": "prettier -w .",
"test": "prettier -c . && nyc mocha -- --recursive --check-leaks --timeout 15000",
"acceptance": "NOCK_OFF=true NOCK_REC=false JENKINS_TEST_URL=http://admin:admin@localhost:8080 mocha --recursive --check-leaks --timeout 15000"
Expand Down
9 changes: 9 additions & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"include": ["lib/**/*"],
"compilerOptions": {
"allowJs": true,
"declaration": true,
"emitDeclarationOnly": true,
"outDir": "types"
}
}

0 comments on commit 7acfcc8

Please sign in to comment.