Skip to content

Commit

Permalink
build: add types to exports field + update ignore files
Browse files Browse the repository at this point in the history
- support TypeScript 4.7
  • Loading branch information
dmnsgn committed Jul 6, 2024
1 parent 9f48e23 commit 3e1d148
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 29 deletions.
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
node_modules
.DS_Store
types
lib
/types
/lib
13 changes: 7 additions & 6 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
web_modules
examples
docs
coverage
test
.github
/web_modules
/examples
/docs
/coverage
/test
/.github
screenshot.*
index.html
tsconfig.json
.editorconfig
.nojekyll
38 changes: 20 additions & 18 deletions package-lock.json

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

12 changes: 9 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,21 @@
"author": "Damien Seguin (https://github.com/dmnsgn)",
"sideEffects": false,
"type": "module",
"exports": "./index.js",
"exports": {
".": {
"types": "./types/index.d.ts",
"default": "./index.js"
}
},
"main": "index.js",
"types": "types/index.d.ts",
"devDependencies": {
"canvas-context": "^3.2.0",
"es-module-shims": "^1.10.0"
},
"engines": {
"node": ">=18.0.0",
"npm": ">=8.6.0"
"node": ">=22.0.0",
"npm": ">=10.5.1",
"snowdev": ">=2.2.x"
}
}

0 comments on commit 3e1d148

Please # to comment.