Skip to content

Commit

Permalink
Demo mostly done! CI needed to add it in release.
Browse files Browse the repository at this point in the history
I might want to rework the landing page and bring it to svelte as well at some point.
CI must copy some files in there before building, or the final demo will not work as expected.
  • Loading branch information
KaruroChori committed Jan 9, 2025
1 parent 8418f8d commit d8ef9e3
Show file tree
Hide file tree
Showing 16 changed files with 657 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ subprojects/*
/wraps/cfltk
*.autogen.*
/dist/*
!/dist/wasm-demo/
!/dist/root-website/
!/dist/website/
/dist/website/doxygen/*
Expand Down
28 changes: 28 additions & 0 deletions dist/wasm-demo/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
node_modules

# Output
.output
.vercel
.netlify
.wrangler
/.svelte-kit
/build

# OS
.DS_Store
Thumbs.db

# Env
.env
.env.*
!.env.example
!.env.test

# Vite
vite.config.js.timestamp-*
vite.config.ts.timestamp-*

bun.lockb

/static/vs.templ.js
/static/examples/*
2 changes: 2 additions & 0 deletions dist/wasm-demo/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Just the wasm demo for `vs.templ`.
Examples and `vs.templ.js` must be copied as part of the CI before building it.
30 changes: 30 additions & 0 deletions dist/wasm-demo/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"name": "wasm-vs-templ",
"private": true,
"version": "0.0.1",
"type": "module",
"scripts": {
"dev": "vite dev",
"build": "vite build",
"preview": "vite preview",
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch"
},
"devDependencies": {
"@sveltejs/adapter-auto": "^3.0.0",
"@sveltejs/kit": "^2.0.0",
"@sveltejs/vite-plugin-svelte": "^4.0.0",
"svelte": "^5.0.0",
"svelte-check": "^4.0.0",
"typescript": "^5.0.0",
"vite": "^5.4.11"
},
"dependencies": {
"@bjorn3/browser_wasi_shim": "^0.3.0",
"@sveltejs/adapter-static": "^3.0.8",
"@xterm/addon-fit": "^0.10.0",
"@xterm/xterm": "^5.5.0",
"monaco-editor": "^0.52.2",
"paneforge": "^0.0.6"
}
}
13 changes: 13 additions & 0 deletions dist/wasm-demo/src/app.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
// See https://svelte.dev/docs/kit/types#app.d.ts
// for information about these interfaces
declare global {
namespace App {
// interface Error {}
// interface Locals {}
// interface PageData {}
// interface PageState {}
// interface Platform {}
}
}

export {};
18 changes: 18 additions & 0 deletions dist/wasm-demo/src/app.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<!doctype html>
<html lang="en" style="height:100%;">

<head>
<meta charset="utf-8" />
<link rel="icon" href="%sveltekit.assets%/favicon.png" />
<link rel="stylesheet" href="%sveltekit.assets%/reset.css" />
<link rel="stylesheet" href="%sveltekit.assets%/main.css" />
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/distr/fira_code.css">
<meta name="viewport" content="width=device-width, initial-scale=1" />
%sveltekit.head%
</head>

<body data-sveltekit-preload-data="hover" style="height:100%;">
<div style="display: contents">%sveltekit.body%</div>
</body>

</html>
Empty file added dist/wasm-demo/src/lib/index.ts
Empty file.
2 changes: 2 additions & 0 deletions dist/wasm-demo/src/routes/+layout.server.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
export const ssr = false;
export const prerender = true;
Loading

0 comments on commit d8ef9e3

Please sign in to comment.