@tresjs/nuxt 1.0.0-alpha.0 → 1.0.0-alpha.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/module.json +1 -1
- package/dist/module.mjs +11 -4
- package/package.json +9 -7
package/dist/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
import { defineNuxtModule, createResolver, addComponent, addImports } from '@nuxt/kit';
|
|
1
|
+
import { defineNuxtModule, createResolver, addComponent, addImports, resolvePath } from '@nuxt/kit';
|
|
2
2
|
import * as core from '@tresjs/core';
|
|
3
3
|
import { readPackageJSON } from 'pkg-types';
|
|
4
|
+
import { findExportNames } from 'mlly';
|
|
5
|
+
import { readFile } from 'fs/promises';
|
|
4
6
|
|
|
5
7
|
const module = defineNuxtModule({
|
|
6
8
|
meta: {
|
|
@@ -16,7 +18,7 @@ const module = defineNuxtModule({
|
|
|
16
18
|
filePath: resolver.resolve("./runtime/components/TresCanvas.vue"),
|
|
17
19
|
name: "TresCanvas"
|
|
18
20
|
});
|
|
19
|
-
nuxt.options.build.transpile.push(/@tresjs
|
|
21
|
+
nuxt.options.build.transpile.push(/@tresjs/);
|
|
20
22
|
for (const name in core) {
|
|
21
23
|
if (name.match(/^use/)) {
|
|
22
24
|
addImports({
|
|
@@ -47,8 +49,13 @@ const module = defineNuxtModule({
|
|
|
47
49
|
const pkg = await readPackageJSON(nuxt.options.rootDir);
|
|
48
50
|
const coreDeps = Object.keys({ ...pkg.dependencies, ...pkg.devDependencies }).filter((d) => d.startsWith("@tresjs/"));
|
|
49
51
|
for (const mod of /* @__PURE__ */ new Set([...options.modules, ...coreDeps])) {
|
|
50
|
-
|
|
51
|
-
|
|
52
|
+
if (mod === "@tresjs/core" || mod === "@tresjs/nuxt")
|
|
53
|
+
continue;
|
|
54
|
+
const entry = await resolvePath(mod);
|
|
55
|
+
if (entry === mod)
|
|
56
|
+
continue;
|
|
57
|
+
const imports = findExportNames(await readFile(entry, "utf8"));
|
|
58
|
+
for (const name of imports) {
|
|
52
59
|
if (name.match(/^[a-z]/)) {
|
|
53
60
|
addImports({
|
|
54
61
|
from: mod,
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@tresjs/nuxt",
|
|
3
3
|
"type": "module",
|
|
4
4
|
"packageManager": "pnpm@8.6.2",
|
|
5
|
-
"version": "1.0.0-alpha.
|
|
5
|
+
"version": "1.0.0-alpha.2",
|
|
6
6
|
"description": "TresJS integration for Nuxt.",
|
|
7
7
|
"repository": "@tresjs/nuxt",
|
|
8
8
|
"author": "Daniel Roe (https://github.com/danielroe/)",
|
|
@@ -34,12 +34,14 @@
|
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
36
|
"@nuxt/kit": "^3.5.2",
|
|
37
|
-
"@tresjs/cientos": "^2.1.
|
|
38
|
-
"@tresjs/core": "^2.1.
|
|
37
|
+
"@tresjs/cientos": "^2.1.4",
|
|
38
|
+
"@tresjs/core": "^2.1.3",
|
|
39
39
|
"@tresjs/post-processing": "^0.2.0",
|
|
40
40
|
"@types/three": "^0.152.1",
|
|
41
|
+
"mlly": "^1.3.0",
|
|
41
42
|
"pkg-types": "^1.0.3",
|
|
42
|
-
"three": "^0.153.0"
|
|
43
|
+
"three": "^0.153.0",
|
|
44
|
+
"typescript": "^5.1.3"
|
|
43
45
|
},
|
|
44
46
|
"devDependencies": {
|
|
45
47
|
"@nuxt/eslint-config": "^0.1.1",
|
|
@@ -47,12 +49,12 @@
|
|
|
47
49
|
"@nuxt/schema": "^3.5.2",
|
|
48
50
|
"@nuxt/test-utils": "^3.5.1",
|
|
49
51
|
"@release-it/conventional-changelog": "^5.1.1",
|
|
50
|
-
"@types/node": "^
|
|
52
|
+
"@types/node": "^20.3.1",
|
|
51
53
|
"changelogen": "^0.5.3",
|
|
52
54
|
"eslint": "^8.42.0",
|
|
53
55
|
"nuxt": "^3.5.1",
|
|
54
|
-
"playwright": "^1.35.
|
|
56
|
+
"playwright": "^1.35.1",
|
|
55
57
|
"release-it": "^15.11.0",
|
|
56
|
-
"vitest": "^0.
|
|
58
|
+
"vitest": "^0.32.1"
|
|
57
59
|
}
|
|
58
60
|
}
|