Skip to content

Commit

Permalink
fix github-pages deployment, also fix click event
Browse files Browse the repository at this point in the history
  • Loading branch information
CrossTheStreams committed Aug 11, 2023
1 parent f8f0cd3 commit 59556fc
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "0.0.1",
"private": true,
"scripts": {
"deploy": "npm run build && gh-pages -d build",
"deploy": "npm run build && npx gh-pages -d build -t true",
"dev": "vite dev",
"build": "vite build",
"preview": "vite preview",
Expand Down
3 changes: 2 additions & 1 deletion src/lib/Note.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
</script>

<!-- svelte-ignore a11y-no-static-element-interactions -->
<div class:active={note} on:keydown={() => dispatch('click')}>
<!-- svelte-ignore a11y-click-events-have-key-events -->
<div class:active={note} on:click={() => dispatch('click')}>
{#if note}
Playing
{:else}
Expand Down
7 changes: 4 additions & 3 deletions svelte.config.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
import adapter from '@sveltejs/adapter-static';
import { vitePreprocess } from '@sveltejs/kit/vite';

const dev = process.argv.includes('dev');

/** @type {import('@sveltejs/kit').Config} */
const config = {
// Consult https://kit.svelte.dev/docs/integrations#preprocessors
// for more information about preprocessors
preprocess: vitePreprocess(),

kit: {
adapter: adapter()
adapter: adapter(),
paths: {
base: process.env.NODE_ENV === 'production' ? '/looper' : '',
}
}
};

Expand Down

0 comments on commit 59556fc

Please sign in to comment.