clean up, more games, add deployment script

This commit is contained in:
Jeremy Penner 2024-11-28 22:12:11 -05:00
parent ba2fdd5caf
commit 5dcb8038c4
10 changed files with 23 additions and 5 deletions

4
.gitignore vendored
View file

@ -1,5 +1,5 @@
.direnv .direnv
smb.nes *.nes
# Logs # Logs
logs logs
*.log *.log
@ -24,3 +24,5 @@ dist-ssr
*.njsproj *.njsproj
*.sln *.sln
*.sw? *.sw?
junk

Binary file not shown.

View file

@ -6,7 +6,7 @@
<title>Meowio</title> <title>Meowio</title>
</head> </head>
<body> <body>
<div id="app"></div> <div id="app">loading...</div>
<script type="module" src="/src/main.js"></script> <script type="module" src="/src/main.js"></script>
</body> </body>
</html> </html>

View file

@ -7,7 +7,8 @@
"dev": "vite", "dev": "vite",
"build": "vite build", "build": "vite build",
"preview": "vite preview", "preview": "vite preview",
"rebuild": "cd jsnes && yarn && cd .. && yarn upgrade jsnes && vite --force" "rebuild": "cd jsnes && yarn && cd .. && yarn upgrade jsnes && vite --force",
"deploy": "vite build && rsync -r --chown nginx:nginx dist/ information-superhighway.net:/var/www/information-superhighway/meowio"
}, },
"dependencies": { "dependencies": {
"jsnes": "file:./jsnes" "jsnes": "file:./jsnes"

View file

@ -1,5 +1,4 @@
<script> <script>
import { loadSample } from './lib/sampload.js'
import NES from './lib/NES.svelte' import NES from './lib/NES.svelte'
import SampleTweak from './lib/SampleTweak.svelte'; import SampleTweak from './lib/SampleTweak.svelte';
@ -37,12 +36,25 @@
<main> <main>
<NES {rom} {opts}/> <NES {rom} {opts}/>
<button onclick={() => nes_load_url("smb.nes")}>Mario</button> <button onclick={() => nes_load_url("smb.nes")}>Mario</button>
<button onclick={() => nes_load_url("smb2.nes")}>Mariio</button>
<button onclick={() => nes_load_url("smb3.nes")}>Mariiio</button>
<button onclick={() => nes_load_url("zelda.nes")}>Zelda</button>
<button onclick={() => nes_load_url("Tetris.nes")}>Tetris</button> <button onclick={() => nes_load_url("Tetris.nes")}>Tetris</button>
<button onclick={() => nes_load_url("megaman2.nes")}>Mega Man 2</button>
<button onclick={() => nes_load_url("ducktales.nes")}>Ducktales</button>
<button onclick={() => nes_load_url("pictionary.nes")}>Pictionary</button>
<button onclick={() => nes_load_url("granddad.nes")}>Grand Dad</button>
<button onclick={() => nes_load_url("RadGravity.nes")}>Rad Gravity</button>
<input bind:files={romfile} type="file" /> <input bind:files={romfile} type="file" />
<hr/> <hr/>
<p>DPad: Arrow keys<br/>B button: Z, A button: X, Select: Tab / C, Start: Return / V</p> <p>DPad: Arrow keys<br/>B button: Z, A button: X, Select: Tab / C, Start: Return / V</p>
<hr/> <hr/>
<SampleTweak bind:opts /> <SampleTweak bind:opts />
<hr/>
<div>
made by <a href="https://gamemaking.social/@SpindleyQ/">jeremy penner</a> | based on <a href="https://jsnes.org">jsnes</a> | <a href="https://git.information-superhighway.net/SpindleyQ/meowio/">source code</a>
</div>
<div>no copyright intended, delete all roms after 48 hours or nintondo will getcha</div>
</main> </main>
<style> <style>

View file

@ -2,8 +2,10 @@ import { mount } from 'svelte'
import './app.css' import './app.css'
import App from './App.svelte' import App from './App.svelte'
const appElement = document.getElementById('app');
appElement.innerHTML = "";
const app = mount(App, { const app = mount(App, {
target: document.getElementById('app'), target: appElement,
}) })
export default app export default app

View file

@ -4,4 +4,5 @@ import { svelte } from '@sveltejs/vite-plugin-svelte'
// https://vite.dev/config/ // https://vite.dev/config/
export default defineConfig({ export default defineConfig({
plugins: [svelte()], plugins: [svelte()],
base: "",
}) })