Skip to content

Commit

Permalink
Generate .d.ts from JSDoc
Browse files Browse the repository at this point in the history
  • Loading branch information
mroderick committed Nov 16, 2020
1 parent 7bad650 commit fd8aabd
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 2 deletions.
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v14.15.0
6 changes: 6 additions & 0 deletions package-lock.json

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

7 changes: 5 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"author": "Christian Johansen",
"license": "BSD-3-Clause",
"main": "./lib/samsam",
"types": "./dist/samsam.d.ts",
"repository": {
"type": "git",
"url": "https://github.com/sinonjs/samsam.git"
Expand All @@ -15,9 +16,10 @@
},
"scripts": {
"benchmark": "node lib/deep-equal-benchmark.js",
"build": "run-s build:dist-folder build:bundle",
"build": "run-s build:dist-folder build:bundle build:type-defs",
"build:bundle": "rollup -c",
"build:dist-folder": "mkdirp dist",
"build:type-defs": "tsc",
"jsdoc": "jsdoc -c jsdoc.conf.json",
"lint": "eslint .",
"prepublishOnly": "npm run build && mkdocs gh-deploy -r upstream || mkdocs gh-deploy -r origin",
Expand Down Expand Up @@ -74,7 +76,8 @@
"proxyquire-universal": "^2.1.0",
"proxyquireify": "^3.2.1",
"rollup": "^1.23.0",
"rollup-plugin-commonjs": "^10.1.0"
"rollup-plugin-commonjs": "^10.1.0",
"typescript": "^4.0.5"
},
"nyc": {
"exclude": [
Expand Down
10 changes: 10 additions & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"include": [
"dist/*.js"
],
"compilerOptions": {
"declaration": true,
"emitDeclarationOnly": true,
"allowJs": true
}
}

0 comments on commit fd8aabd

Please sign in to comment.