Skip to content

Commit c42b69e

Browse files
fehnomenaltoddeTV
andauthored
feat: expose core functionality as unplugin plugins (#31)
Co-authored-by: Thorsten Seyschab <business@todde.tv>
1 parent 87815fc commit c42b69e

File tree

13 files changed

+665
-52
lines changed

13 files changed

+665
-52
lines changed

README.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -153,17 +153,17 @@ resulting in the following compatibility in our project:
153153

154154
(Legend: 🟢 Tested & Supported | 🟡 Not Yet Tested | 🔴 Not Supported)
155155

156-
| Build Tool | Status | Note |
157-
| ------------------------------------- | ------ | ------------------------------------------------------------------------- |
158-
| [esbuild](https://esbuild.github.io/) | 🟢 | |
159-
| [Rollup](https://rollupjs.org/) | 🟢 | |
160-
| [Rspack](https://www.rspack.dev/) | 🟢 | |
161-
| [Vite](https://vitejs.dev/) | 🟢 | |
162-
| [Webpack](https://webpack.js.org/) | 🟢 | |
163-
| [Astro](https://astro.build/) | 🟡 | |
164-
| [Nuxt3](https://nuxt.com/) | 🟡 | |
165-
| [Rolldown](https://rolldown.rs/) | 🟡 | ⚠️ currently experimental in [Unplugin](https://github.com/unjs/unplugin) |
166-
| [Farm](https://www.farmfe.org/) | 🔴 | Tested & not working. Contributions welcome! ❤️ |
156+
| Build Tool | Status | Note |
157+
| ------------------------------------- | ------ | ----------------------------------------------------------------------------------------------------------------------------------------- |
158+
| [esbuild](https://esbuild.github.io/) | 🟢 | |
159+
| [Rolldown](https://rolldown.rs/) | 🟢 | ⚠️ currently experimental in [Unplugin](https://github.com/unjs/unplugin) |
160+
| [Rollup](https://rollupjs.org/) | 🟢 | |
161+
| [Rspack](https://www.rspack.dev/) | 🟢 | |
162+
| [Vite](https://vitejs.dev/) | 🟢 | |
163+
| [Astro](https://astro.build/) | 🟡 | |
164+
| [Nuxt3](https://nuxt.com/) | 🟡 | |
165+
| [Farm](https://www.farmfe.org/) | 🔴 | Tested & model files are not emitted (see [Issue #27](https://github.com/toddeTV/gltf-type-toolkit/issues/27)). Contributions welcome! ❤️ |
166+
| [Webpack](https://webpack.js.org/) | 🔴 | Tested & model files are borked (see [Issue #30](https://github.com/toddeTV/gltf-type-toolkit/issues/30)). Contributions welcome! ❤️ |
167167

168168
## glTF Versions and Representations
169169

package.json

Lines changed: 36 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -51,39 +51,47 @@
5151
"import": "./dist/astro.js",
5252
"require": "./dist/astro.cjs"
5353
},
54-
"./rspack": {
55-
"import": "./dist/rspack.js",
56-
"require": "./dist/rspack.cjs"
57-
},
58-
"./vite": {
59-
"import": "./dist/vite.js",
60-
"require": "./dist/vite.cjs"
61-
},
62-
"./webpack": {
63-
"import": "./dist/webpack.js",
64-
"require": "./dist/webpack.cjs"
65-
},
66-
"./rollup": {
67-
"import": "./dist/rollup.js",
68-
"require": "./dist/rollup.cjs"
69-
},
7054
"./esbuild": {
7155
"import": "./dist/esbuild.js",
7256
"require": "./dist/esbuild.cjs"
7357
},
58+
"./farm": {
59+
"import": "./dist/farm.js",
60+
"require": "./dist/farm.cjs"
61+
},
62+
"./gltf-loader": {
63+
"import": "./dist/gltf-loader.js",
64+
"require": "./dist/gltf-loader.cjs"
65+
},
7466
"./nuxt": {
7567
"import": "./dist/nuxt.js",
7668
"require": "./dist/nuxt.cjs"
7769
},
78-
"./farm": {
79-
"import": "./dist/farm.js",
80-
"require": "./dist/farm.cjs"
70+
"./rolldown": {
71+
"import": "./dist/rolldown.js",
72+
"require": "./dist/rolldown.cjs"
73+
},
74+
"./rollup": {
75+
"import": "./dist/rollup.js",
76+
"require": "./dist/rollup.cjs"
77+
},
78+
"./rspack": {
79+
"import": "./dist/rspack.js",
80+
"require": "./dist/rspack.cjs"
8181
},
8282
"./types": {
8383
"import": "./dist/types.js",
8484
"require": "./dist/types.cjs"
8585
},
86-
"./*": "./*"
86+
"./vite": {
87+
"import": "./dist/vite.js",
88+
"require": "./dist/vite.cjs"
89+
},
90+
"./webpack": {
91+
"import": "./dist/webpack.js",
92+
"require": "./dist/webpack.cjs"
93+
},
94+
"./package.json": "./package.json"
8795
},
8896
"main": "dist/index.cjs",
8997
"module": "dist/index.js",
@@ -129,6 +137,7 @@
129137
"astro": "*",
130138
"draco3d": "^1.5.7",
131139
"esbuild": "*",
140+
"rolldown": "^1.0.0-beta.3",
132141
"rollup": "^3 || ^4",
133142
"three": ">=0.170.0",
134143
"vite": ">=3",
@@ -153,6 +162,9 @@
153162
"esbuild": {
154163
"optional": true
155164
},
165+
"rolldown": {
166+
"optional": true
167+
},
156168
"rollup": {
157169
"optional": true
158170
},
@@ -164,9 +176,11 @@
164176
}
165177
},
166178
"dependencies": {
179+
"@node-rs/xxhash": "~1.7.6",
167180
"citty": "~0.1.6",
168181
"consola": "~3.4.0",
169-
"handlebars": "~4.7.8"
182+
"handlebars": "~4.7.8",
183+
"unplugin": "~2.1.2"
170184
},
171185
"devDependencies": {
172186
"@antfu/eslint-config": "~3.16.0",
@@ -182,8 +196,7 @@
182196
"three": "~0.172.0",
183197
"three-stdlib": "~2.35.12",
184198
"tsup": "~8.3.5",
185-
"typescript": "~5.7.3",
186-
"unplugin": "~2.1.2"
199+
"typescript": "~5.7.3"
187200
},
188201
"pnpm": {
189202
"patchedDependencies": {

0 commit comments

Comments
 (0)