Skip to content

Commit

Permalink
Test with rune syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
sockmaster27 committed Oct 31, 2024
1 parent 2e61fc2 commit 22701fa
Show file tree
Hide file tree
Showing 20 changed files with 60 additions and 14 deletions.
2 changes: 1 addition & 1 deletion README.md
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/svader/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"!dist/**/*.spec.*"
],
"peerDependencies": {
"svelte": "^4.0.0"
"svelte": "^5.0.0||^4.0.0"
},
"devDependencies": {
"@sveltejs/kit": "^2.0.0",
Expand Down
11 changes: 10 additions & 1 deletion packages/svader/src/lib/WebGlShader.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,19 @@
</script>

<script>
import { onDestroy, onMount } from "svelte";
import { onMount } from "svelte";
import BaseShader from "./BaseShader.svelte";
/**
* This prop is only here to satisfy compatibility with Svelte 5 projects.
* HAS NO EFFECT.
*
* @type {any}
*/
export let children = null;
children;
/**
* The width of the canvas element.
*
Expand Down
9 changes: 9 additions & 0 deletions packages/svader/src/lib/WebGpuShader.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,15 @@
import BaseShader from "./BaseShader.svelte";
import { onDestroy, onMount } from "svelte";
/**
* This prop is only here to satisfy compatibility with Svelte 5 projects.
* HAS NO EFFECT.
*
* @type {any}
*/
export let children = null;
children;
/**
* The width of the canvas element.
*
Expand Down
6 changes: 3 additions & 3 deletions packages/tests-svelte5/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@
},
"devDependencies": {
"@sveltejs/adapter-auto": "^3.0.0",
"@sveltejs/kit": "^2.0.0",
"@sveltejs/kit": "^2.5.27",
"@sveltejs/vite-plugin-svelte": "^4.0.0",
"svelte": "^5.0.0",
"svelte-check": "^4.0.0",
"typescript": "^5.0.0",
"vite": "^5.0.11"
"typescript": "^5.5.0",
"vite": "^5.4.4"
},
"svelte": "./dist/index.js",
"types": "./dist/index.d.ts",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
<svelte:options runes />

<script>
import { WebGlShader } from "svader";
import shaderCode from "./shader.frag?raw";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
<svelte:options runes />

<script>
import { WebGpuShader } from "svader";
import shaderCode from "./shader.wgsl?raw";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
<svelte:options runes />

<script>
import { WebGlShader } from "svader";
import shaderCode from "./shader.frag?raw";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
<svelte:options runes />

<script>
import { WebGpuShader } from "svader";
import shaderCode from "./shader.wgsl?raw";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
<svelte:options runes />

<script>
import { WebGlShader } from "svader";
import shaderCode from "./shader.frag?raw";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
<svelte:options runes />

<script>
import { WebGpuShader } from "svader";
import shaderCode from "./shader.wgsl?raw";
Expand Down
2 changes: 2 additions & 0 deletions packages/tests-svelte5/src/routes/logo/webgl/+page.svelte
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
<svelte:options runes />

<script>
import { WebGlShader } from "svader";
import shaderCode from "./shader.frag?raw";
Expand Down
2 changes: 2 additions & 0 deletions packages/tests-svelte5/src/routes/logo/webgpu/+page.svelte
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
<svelte:options runes />

<script>
import { WebGpuShader } from "svader";
import shaderCode from "./shader.wgsl?raw";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
<svelte:options runes />

<script>
import { WebGlShader } from "svader";
import shaderCode from "./shader.frag?raw";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
<svelte:options runes />

<script>
import { WebGpuShader } from "svader";
import shaderCode from "./shader.wgsl?raw";
Expand Down
4 changes: 3 additions & 1 deletion packages/tests-svelte5/src/routes/remount/webgl/+page.svelte
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
<svelte:options runes />

<script>
import { WebGlShader } from "svader";
import shaderCode from "./shader.frag?raw";
let show = true;
let show = $state(true);
</script>

<label for="show">Show</label>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
<svelte:options runes />

<script>
import { WebGpuShader } from "svader";
import shaderCode from "./shader.wgsl?raw";
let show = true;
let show = $state(true);
</script>

<label for="show">Show</label>
Expand Down
4 changes: 3 additions & 1 deletion packages/tests-svelte5/src/routes/slider/webgl/+page.svelte
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
<svelte:options runes />

<script>
import { WebGlShader } from "svader";
import shaderCode from "./shader.frag?raw";
let val = 0.75;
let val = $state(0.75);
</script>

<main>
Expand Down
4 changes: 3 additions & 1 deletion packages/tests-svelte5/src/routes/slider/webgpu/+page.svelte
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
<svelte:options runes />

<script>
import { WebGpuShader } from "svader";
import shaderCode from "./shader.wgsl?raw";
let val = 0.75;
let val = $state(0.75);
</script>

<main>
Expand Down

0 comments on commit 22701fa

Please sign in to comment.