Skip to content

Commit a13c277

Browse files
committed
chef now used in react three create
1 parent b70a2bd commit a13c277

64 files changed

Lines changed: 3906 additions & 3844 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

apps/github/package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
"start": "node dist/index.js"
2626
},
2727
"devDependencies": {
28-
"@types/isomorphic-git__lightning-fs": "^4.4.8",
29-
"@types/node": "^20.17.32"
28+
"@types/isomorphic-git__lightning-fs": "^4.4.8"
3029
}
3130
}

apps/pick/package.json

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,5 @@
1616
"build": "tsc",
1717
"dev": "dotenvx run -f .env -- node --watch --loader ts-node/esm src/index.ts",
1818
"start": "node dist/index.js"
19-
},
20-
"devDependencies": {
21-
"@types/node": "^20.17.32"
2219
}
2320
}
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
import { build } from 'vite'
2+
import react from '@vitejs/plugin-react'
3+
import { chefPlugin } from '@pmndrs/vite-chef'
4+
import { esmshPlugin } from '@pmndrs/vite-esmsh'
5+
import { loadRecipe } from '@react-three/create'
6+
7+
async function runBuild() {
8+
await build({
9+
plugins: [
10+
react(),
11+
await chefPlugin({
12+
recipe: 'recipe.json',
13+
resolve: loadRecipe,
14+
}),
15+
esmshPlugin({
16+
packages: ['react', 'react-dom', '@react-three/*'],
17+
}),
18+
],
19+
build: {
20+
outDir: 'dist',
21+
rollupOptions: {
22+
input: 'index.html',
23+
},
24+
},
25+
})
26+
}
27+
28+
runBuild().catch(console.error)
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"name": "vite-plugin-example",
3+
"version": "0.0.0",
4+
"type": "module",
5+
"scripts": {
6+
"build": "npx tsx build-example.ts"
7+
},
8+
"dependencies": {
9+
"@vitejs/plugin-react": "^4.3.4",
10+
"typescript": "^5.8.3",
11+
"vite": "^6.3.4",
12+
"tsx": "^4.19.2",
13+
"@pmndrs/vite-chef": "workspace:^",
14+
"@pmndrs/vite-esmsh": "workspace:^",
15+
"@react-three/create": "workspace:^"
16+
}
17+
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"name": "example-app",
3+
"version": "1.0.0",
4+
"requirements": {
5+
"base": "0.0.0",
6+
"drei": "0.0.0",
7+
"xr": "0.0.0",
8+
"spinning-boxes": "0.0.0"
9+
},
10+
"edits": {
11+
"@projectName": "vite-plugin-example",
12+
"@packageManager": "npm"
13+
}
14+
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"extends": "../../tsconfig.json"
3+
}

package.json

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,8 @@
33
"ts-node": "^10.9.2",
44
"typescript": "^5.8.3",
55
"json": "^11.0.0",
6-
"vitest": "^3.1.3"
7-
},
8-
"scripts": {
9-
"test": "vitest"
6+
"vitest": "^3.1.3",
7+
"vite": "^6.3.4",
8+
"@vitejs/plugin-react": "^4.3.4"
109
}
1110
}

packages/chef/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,5 @@
3232
- folders are not allowed to contain `.` in their name
3333
- files are not allowed to start with `@`
3434
- strings in edits are always seen as raw values e.g. `{ "test": "123" }` will end up in the finap project as `{ "test": 123 }`. To achieve `{ "test": "123" }` in the project, additional quotes are necassary: `{ "test": "'123'" }`
35-
- using the string edit `'{ "test": "123" }'` is the same as using the json edit `{ "test": "'123'" }`
35+
- using the string edit `'{ "test": "123" }'` is the same as using the json edit `{ "test": "'123'" }`
36+
- to set sub properties on objects where the keys contain `/`, these slashes must be escaped with a backslash `\/`

0 commit comments

Comments
 (0)