Skip to content

Commit

Permalink
feat: add better CJS + types support (#66)
Browse files Browse the repository at this point in the history
fix #44
  • Loading branch information
luwes authored Dec 19, 2024
1 parent c6ae20b commit 8aa2066
Show file tree
Hide file tree
Showing 12 changed files with 286 additions and 51 deletions.
28 changes: 24 additions & 4 deletions packages/cloudflare-video-element/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,31 @@
"dist"
],
"type": "module",
"main": "cloudflare-video-element.js",
"types": "cloudflare-video-element.d.ts",
"types": "./dist/cloudflare-video-element.d.ts",
"main": "./dist/cloudflare-video-element.js",
"exports": {
".": "./cloudflare-video-element.js",
"./react": "./dist/react.js"
".": {
"types": "./dist/cloudflare-video-element.d.ts",
"import": "./dist/cloudflare-video-element.js",
"require": "./dist/cjs/cloudflare-video-element.js",
"default": "./dist/cloudflare-video-element.js"
},
"./react": {
"types": "./dist/react.d.ts",
"import": "./dist/react.js",
"require": "./dist/cjs/react.js",
"default": "./dist/react.js"
}
},
"typesVersions": {
"*": {
"react": [
"./dist/react.d.ts"
],
"*": [
"./dist/cloudflare-video-element.d.ts"
]
}
},
"scripts": {
"lint": "eslint *.js",
Expand Down
28 changes: 24 additions & 4 deletions packages/dash-video-element/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,31 @@
"dist"
],
"type": "module",
"main": "dash-video-element.js",
"types": "dash-video-element.d.ts",
"types": "./dist/dash-video-element.d.ts",
"main": "./dist/dash-video-element.js",
"exports": {
".": "./dash-video-element.js",
"./react": "./dist/react.js"
".": {
"types": "./dist/dash-video-element.d.ts",
"import": "./dist/dash-video-element.js",
"require": "./dist/cjs/dash-video-element.js",
"default": "./dist/dash-video-element.js"
},
"./react": {
"types": "./dist/react.d.ts",
"import": "./dist/react.js",
"require": "./dist/cjs/react.js",
"default": "./dist/react.js"
}
},
"typesVersions": {
"*": {
"react": [
"./dist/react.d.ts"
],
"*": [
"./dist/dash-video-element.d.ts"
]
}
},
"scripts": {
"lint": "eslint *.js",
Expand Down
28 changes: 24 additions & 4 deletions packages/hls-video-element/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,31 @@
"dist"
],
"type": "module",
"main": "hls-video-element.js",
"types": "hls-video-element.d.ts",
"types": "./dist/hls-video-element.d.ts",
"main": "./dist/hls-video-element.js",
"exports": {
".": "./hls-video-element.js",
"./react": "./dist/react.js"
".": {
"types": "./dist/hls-video-element.d.ts",
"import": "./dist/hls-video-element.js",
"require": "./dist/cjs/hls-video-element.js",
"default": "./dist/hls-video-element.js"
},
"./react": {
"types": "./dist/react.d.ts",
"import": "./dist/react.js",
"require": "./dist/cjs/react.js",
"default": "./dist/react.js"
}
},
"typesVersions": {
"*": {
"react": [
"./dist/react.d.ts"
],
"*": [
"./dist/hls-video-element.d.ts"
]
}
},
"scripts": {
"lint": "eslint *.js",
Expand Down
28 changes: 24 additions & 4 deletions packages/jwplayer-video-element/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,31 @@
"dist"
],
"type": "module",
"main": "jwplayer-video-element.js",
"types": "jwplayer-video-element.d.ts",
"types": "./dist/jwplayer-video-element.d.ts",
"main": "./dist/jwplayer-video-element.js",
"exports": {
".": "./jwplayer-video-element.js",
"./react": "./dist/react.js"
".": {
"types": "./dist/jwplayer-video-element.d.ts",
"import": "./dist/jwplayer-video-element.js",
"require": "./dist/cjs/jwplayer-video-element.js",
"default": "./dist/jwplayer-video-element.js"
},
"./react": {
"types": "./dist/react.d.ts",
"import": "./dist/react.js",
"require": "./dist/cjs/react.js",
"default": "./dist/react.js"
}
},
"typesVersions": {
"*": {
"react": [
"./dist/react.d.ts"
],
"*": [
"./dist/jwplayer-video-element.d.ts"
]
}
},
"scripts": {
"lint": "eslint *.js",
Expand Down
28 changes: 24 additions & 4 deletions packages/shaka-video-element/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,31 @@
"dist"
],
"type": "module",
"main": "shaka-video-element.js",
"types": "shaka-video-element.d.ts",
"types": "./dist/shaka-video-element.d.ts",
"main": "./dist/shaka-video-element.js",
"exports": {
".": "./shaka-video-element.js",
"./react": "./dist/react.js"
".": {
"types": "./dist/shaka-video-element.d.ts",
"import": "./dist/shaka-video-element.js",
"require": "./dist/cjs/shaka-video-element.js",
"default": "./dist/shaka-video-element.js"
},
"./react": {
"types": "./dist/react.d.ts",
"import": "./dist/react.js",
"require": "./dist/cjs/react.js",
"default": "./dist/react.js"
}
},
"typesVersions": {
"*": {
"react": [
"./dist/react.d.ts"
],
"*": [
"./dist/shaka-video-element.d.ts"
]
}
},
"scripts": {
"lint": "eslint *.js",
Expand Down
28 changes: 24 additions & 4 deletions packages/spotify-audio-element/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,31 @@
"dist"
],
"type": "module",
"main": "spotify-audio-element.js",
"types": "spotify-audio-element.d.ts",
"types": "./dist/spotify-audio-element.d.ts",
"main": "./dist/spotify-audio-element.js",
"exports": {
".": "./spotify-audio-element.js",
"./react": "./dist/react.js"
".": {
"types": "./dist/spotify-audio-element.d.ts",
"import": "./dist/spotify-audio-element.js",
"require": "./dist/cjs/spotify-audio-element.js",
"default": "./dist/spotify-audio-element.js"
},
"./react": {
"types": "./dist/react.d.ts",
"import": "./dist/react.js",
"require": "./dist/cjs/react.js",
"default": "./dist/react.js"
}
},
"typesVersions": {
"*": {
"react": [
"./dist/react.d.ts"
],
"*": [
"./dist/spotify-audio-element.d.ts"
]
}
},
"scripts": {
"lint": "eslint spotify-audio-element.js",
Expand Down
28 changes: 24 additions & 4 deletions packages/videojs-video-element/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,31 @@
"dist"
],
"type": "module",
"main": "videojs-video-element.js",
"types": "videojs-video-element.d.ts",
"types": "./dist/videojs-video-element.d.ts",
"main": "./dist/videojs-video-element.js",
"exports": {
".": "./videojs-video-element.js",
"./react": "./dist/react.js"
".": {
"types": "./dist/videojs-video-element.d.ts",
"import": "./dist/videojs-video-element.js",
"require": "./dist/cjs/videojs-video-element.js",
"default": "./dist/videojs-video-element.js"
},
"./react": {
"types": "./dist/react.d.ts",
"import": "./dist/react.js",
"require": "./dist/cjs/react.js",
"default": "./dist/react.js"
}
},
"typesVersions": {
"*": {
"react": [
"./dist/react.d.ts"
],
"*": [
"./dist/videojs-video-element.d.ts"
]
}
},
"scripts": {
"lint": "eslint *.js",
Expand Down
28 changes: 24 additions & 4 deletions packages/vimeo-video-element/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,31 @@
"dist"
],
"type": "module",
"main": "vimeo-video-element.js",
"types": "vimeo-video-element.d.ts",
"types": "./dist/vimeo-video-element.d.ts",
"main": "./dist/vimeo-video-element.js",
"exports": {
".": "./vimeo-video-element.js",
"./react": "./dist/react.js"
".": {
"types": "./dist/vimeo-video-element.d.ts",
"import": "./dist/vimeo-video-element.js",
"require": "./dist/cjs/vimeo-video-element.js",
"default": "./dist/vimeo-video-element.js"
},
"./react": {
"types": "./dist/react.d.ts",
"import": "./dist/react.js",
"require": "./dist/cjs/react.js",
"default": "./dist/react.js"
}
},
"typesVersions": {
"*": {
"react": [
"./dist/react.d.ts"
],
"*": [
"./dist/vimeo-video-element.d.ts"
]
}
},
"scripts": {
"lint": "eslint *.js",
Expand Down
28 changes: 24 additions & 4 deletions packages/wistia-video-element/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,31 @@
"dist"
],
"type": "module",
"main": "wistia-video-element.js",
"types": "wistia-video-element.d.ts",
"types": "./dist/wistia-video-element.d.ts",
"main": "./dist/wistia-video-element.js",
"exports": {
".": "./wistia-video-element.js",
"./react": "./dist/react.js"
".": {
"types": "./dist/wistia-video-element.d.ts",
"import": "./dist/wistia-video-element.js",
"require": "./dist/cjs/wistia-video-element.js",
"default": "./dist/wistia-video-element.js"
},
"./react": {
"types": "./dist/react.d.ts",
"import": "./dist/react.js",
"require": "./dist/cjs/react.js",
"default": "./dist/react.js"
}
},
"typesVersions": {
"*": {
"react": [
"./dist/react.d.ts"
],
"*": [
"./dist/wistia-video-element.d.ts"
]
}
},
"scripts": {
"lint": "eslint *.js",
Expand Down
28 changes: 24 additions & 4 deletions packages/youtube-video-element/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,31 @@
"dist"
],
"type": "module",
"main": "youtube-video-element.js",
"types": "youtube-video-element.d.ts",
"types": "./dist/youtube-video-element.d.ts",
"main": "./dist/youtube-video-element.js",
"exports": {
".": "./youtube-video-element.js",
"./react": "./dist/react.js"
".": {
"types": "./dist/youtube-video-element.d.ts",
"import": "./dist/youtube-video-element.js",
"require": "./dist/cjs/youtube-video-element.js",
"default": "./dist/youtube-video-element.js"
},
"./react": {
"types": "./dist/react.d.ts",
"import": "./dist/react.js",
"require": "./dist/cjs/react.js",
"default": "./dist/react.js"
}
},
"typesVersions": {
"*": {
"react": [
"./dist/react.d.ts"
],
"*": [
"./dist/youtube-video-element.d.ts"
]
}
},
"scripts": {
"lint": "eslint *.js",
Expand Down
Loading

0 comments on commit 8aa2066

Please sign in to comment.