create-shallot 0.3.9 → 0.4.0
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/index.ts +41 -5
- package/package.json +1 -1
package/index.ts
CHANGED
|
@@ -42,6 +42,14 @@ writeFileSync(
|
|
|
42
42
|
`,
|
|
43
43
|
);
|
|
44
44
|
|
|
45
|
+
writeFileSync(
|
|
46
|
+
join(dir, ".gitignore"),
|
|
47
|
+
`node_modules/
|
|
48
|
+
dist/
|
|
49
|
+
build/
|
|
50
|
+
`,
|
|
51
|
+
);
|
|
52
|
+
|
|
45
53
|
writeFileSync(
|
|
46
54
|
join(dir, "package.json"),
|
|
47
55
|
JSON.stringify(
|
|
@@ -50,9 +58,32 @@ writeFileSync(
|
|
|
50
58
|
version: "0.0.0",
|
|
51
59
|
private: true,
|
|
52
60
|
type: "module",
|
|
53
|
-
scripts: {
|
|
61
|
+
scripts: {
|
|
62
|
+
dev: "vite",
|
|
63
|
+
build: "vite build",
|
|
64
|
+
preview: "vite preview",
|
|
65
|
+
},
|
|
54
66
|
dependencies: { "@dylanebert/shallot": "latest" },
|
|
55
|
-
devDependencies: { vite: "^8.0.0" },
|
|
67
|
+
devDependencies: { typescript: "^5.9.3", vite: "^8.0.0" },
|
|
68
|
+
},
|
|
69
|
+
null,
|
|
70
|
+
2,
|
|
71
|
+
) + "\n",
|
|
72
|
+
);
|
|
73
|
+
|
|
74
|
+
writeFileSync(
|
|
75
|
+
join(dir, "tsconfig.json"),
|
|
76
|
+
JSON.stringify(
|
|
77
|
+
{
|
|
78
|
+
compilerOptions: {
|
|
79
|
+
target: "ESNext",
|
|
80
|
+
module: "ESNext",
|
|
81
|
+
moduleResolution: "bundler",
|
|
82
|
+
strict: true,
|
|
83
|
+
noEmit: true,
|
|
84
|
+
skipLibCheck: true,
|
|
85
|
+
},
|
|
86
|
+
include: ["src"],
|
|
56
87
|
},
|
|
57
88
|
null,
|
|
58
89
|
2,
|
|
@@ -88,14 +119,19 @@ writeFileSync(
|
|
|
88
119
|
|
|
89
120
|
export default defineConfig({
|
|
90
121
|
server: { port: 3000 },
|
|
91
|
-
build: {
|
|
122
|
+
build: {
|
|
123
|
+
target: "esnext",
|
|
124
|
+
outDir: "dist",
|
|
125
|
+
emptyOutDir: true,
|
|
126
|
+
},
|
|
92
127
|
});
|
|
93
128
|
`,
|
|
94
129
|
);
|
|
95
130
|
|
|
96
131
|
writeFileSync(
|
|
97
132
|
join(dir, "src/lib.ts"),
|
|
98
|
-
`import {
|
|
133
|
+
`import { type Config } from "@dylanebert/shallot";
|
|
134
|
+
import { OrbitPlugin } from "@dylanebert/shallot/extras";
|
|
99
135
|
|
|
100
136
|
export const config: Config = {
|
|
101
137
|
plugins: [OrbitPlugin],
|
|
@@ -123,7 +159,7 @@ writeFileSync(
|
|
|
123
159
|
<a id="camera" camera fxaa orbit tonemap transform />
|
|
124
160
|
<a ambient-light />
|
|
125
161
|
<a directional-light />
|
|
126
|
-
<a id="cube" part="shape: box; color:
|
|
162
|
+
<a id="cube" part="size: 1; shape: box; color: 0xd49560" transform="pos: 0" />
|
|
127
163
|
</scene>
|
|
128
164
|
`,
|
|
129
165
|
);
|