Skip to content

Commit 8f37456

Browse files
authored
Add prepare:assets script for game asset setup (#11)
Add a Node.js script that sets up LEGO Island game assets via symlinks: - Accepts source path interactively or via --path/-p flag - Case-insensitive file matching for cross-platform compatibility - Validates all required files before making changes - Supports optional extra/ and textures/ folders - Includes --force/-f flag to skip deletion confirmation Updates README with new setup step and script documentation.
1 parent 15169c3 commit 8f37456

File tree

3 files changed

+376
-3
lines changed

3 files changed

+376
-3
lines changed

README.md

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,17 +23,27 @@ A custom web frontend for the Emscripten port of [isle-portable](https://github.
2323

2424
3. Obtain the game files (`isle.js` and `isle.wasm`) by building the Emscripten version of [isle-portable](https://github.com/isledecomp/isle-portable), then copy them to the project root.
2525

26-
4. Start the development server:
26+
4. Set up the LEGO Island game assets:
27+
```bash
28+
npm run prepare:assets
29+
```
30+
This will prompt you for the path to your LEGO Island installation or mounted ISO and create the necessary symlinks. You can also provide the path directly:
31+
```bash
32+
npm run prepare:assets -- -p /path/to/your/LEGO
33+
```
34+
35+
5. Start the development server:
2736
```bash
2837
npm run dev
2938
```
3039

31-
5. Open the URL shown in the terminal (usually `http://localhost:5173`).
40+
6. Open the URL shown in the terminal (usually `http://localhost:5173`).
3241

3342
## Scripts
3443

3544
| Command | Description |
3645
|---------|-------------|
46+
| `npm run prepare:assets` | Set up LEGO Island game assets via symlinks |
3747
| `npm run dev` | Start development server with hot reload |
3848
| `npm run build` | Build for production (outputs to `dist/`) |
3949
| `npm run preview` | Preview the production build locally |

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77
"build": "vite build && cp isle.js isle.wasm dist/ && node scripts/workbox-inject.js",
88
"build:ci": "vite build && node scripts/workbox-inject.js",
99
"check": "svelte-check --fail-on-warnings",
10-
"preview": "vite preview"
10+
"preview": "vite preview",
11+
"prepare:assets": "node scripts/prepare.js"
1112
},
1213
"devDependencies": {
1314
"@sveltejs/vite-plugin-svelte": "^4.0.0",

0 commit comments

Comments
 (0)