Skip to content

Commit

Permalink
wip: generate type declarations
Browse files Browse the repository at this point in the history
Closes #65
  • Loading branch information
barmac committed Jan 17, 2022
1 parent 69d5477 commit 33acfe0
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 2 deletions.
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 @@ -4,20 +4,22 @@
"description": "Library for creating bpmn-io properties panels.",
"main": "dist/index.js",
"module": "dist/index.esm.js",
"types": "dist/types/index.d.ts",
"files": [
"dist",
"assets",
"preact"
],
"scripts": {
"all": "run-s lint build test",
"build": "del-cli preact dist && rollup -c",
"build": "del-cli preact dist && rollup -c && npm run generate-types",
"build:watch": "rollup -c --watch",
"lint": "eslint .",
"dev": "npm test -- --auto-watch --no-single-run",
"test": "karma start karma.config.js",
"prepublishOnly": "run-s build",
"prepare": "run-s build"
"prepare": "run-s build",
"generate-types": "tsc"
},
"repository": {
"type": "git",
Expand Down Expand Up @@ -82,6 +84,7 @@
"sinon": "^11.1.1",
"sinon-chai": "^3.7.0",
"sirv-cli": "^1.0.12",
"typescript": "^4.5.4",
"webpack": "^5.38.1"
}
}
29 changes: 29 additions & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"compilerOptions": {
"module": "commonjs",
"lib": [
"es2019",
"dom"
],
"target": "es2019",
"allowJs": true,
"checkJs": true,
"rootDir": ".",
"strict": false,
"skipLibCheck": true,
"esModuleInterop": true,
"resolveJsonModule": true,
"jsx": "react-jsx",
"jsxImportSource": "preact",
"outDir": "./dist/types",
"declaration": true,
"emitDeclarationOnly": true,
"removeComments": false
},
"include": [
"src/index.js"
],
"exclude": [
"node_modules"
]
}

0 comments on commit 33acfe0

Please sign in to comment.