Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

✨📚 adding synced docs #16

Draft
wants to merge 10 commits into
base: main
Choose a base branch
from
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
title: Vision
---

# SHIFTY - Vision

A new and intuitive way of controlling intelligent devices developed from first principles for the event industry.
Expand Down
97 changes: 85 additions & 12 deletions package-lock.json

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

6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"test:unit": "vitest"
},
"devDependencies": {
"@mxssfd/typedoc-theme": "^1.1.2",
"@mxssfd/typedoc-theme": "^1.1.3",
"@playwright/test": "^1.28.1",
"@sveltejs/adapter-auto": "^2.0.0",
"@sveltejs/adapter-node": "^1.3.1",
Expand All @@ -41,6 +41,7 @@
"eslint": "^8.28.0",
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-svelte": "^2.30.0",
"mdsvex": "^0.11.0",
"nodemon": "^3.0.1",
"polka": "^0.5.2",
"prettier": "^2.8.0",
Expand All @@ -49,7 +50,7 @@
"svelte-check": "^3.4.3",
"tslib": "^2.4.1",
"tsx": "^3.12.7",
"typedoc": "^0.24.8",
"typedoc": "^0.25.1",
"typescript": "^5.0.0",
"vite": "^4.4.2",
"vitest": "^0.32.2"
Expand All @@ -63,6 +64,7 @@
"fast-xml-parser": "^4.2.7",
"fetch-cookie": "^2.1.0",
"gdtf-types": "^1.0.0",
"github-markdown-css": "^5.2.0",
"json-schema-to-typescript": "^13.0.2",
"jszip": "^3.10.1",
"three": "^0.155.0",
Expand Down
5 changes: 5 additions & 0 deletions src/routes/+page.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<script>
import Readme from '../../README.md';
</script>

<Readme />
2 changes: 0 additions & 2 deletions src/routes/+page.svelte

This file was deleted.

3 changes: 3 additions & 0 deletions src/routes/md.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
body {
background-color: #0d1117;
}
31 changes: 31 additions & 0 deletions src/routes/md.svelte
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<script lang="ts">
import 'github-markdown-css/github-markdown-dark.css';
import './md.css';

export let layout = 'ghDark';
export let title = 'My Document';
</script>

<svelte:head>
<title>{title} | SHIFTY</title>
</svelte:head>

<article class="markdown-body {layout}">
<slot />
</article>

<style>
.markdown-body {
box-sizing: border-box;
min-width: 200px;
max-width: 980px;
margin: 0 auto;
padding: 45px;
}

@media (max-width: 767px) {
.markdown-body {
padding: 15px;
}
}
</style>
5 changes: 5 additions & 0 deletions src/routes/src/routes/visualizer/+page.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<script>
import Readme from '../../../visualizer/README.md';
</script>

<Readme />
5 changes: 5 additions & 0 deletions src/routes/src/routes/visualizer/remote/+page.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<script>
import Readme from '../../../../visualizer/remote/README.md';
</script>

<Readme />
5 changes: 5 additions & 0 deletions src/routes/src/routes/webSocketDemo/+page.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<script>
import Readme from '../../../webSocketDemo/README.md';
</script>

<Readme />
6 changes: 6 additions & 0 deletions src/routes/visualizer/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
---
title: Visualizer
---

# Visualizer

This proof-of-concept shows an environment ([World](https://oshifty.github.io/vision/classes/World.html)) build with [three.js](https://threejs.org). Upon load it fetches a fixture model from GDTF Share and loads it into the environment to be visualized. The poc currently supports Pan / Tilt Attributes only and a very limited selection of fixtures but it can be extended easily in the future. It comes with a remote that is implemented over [here](/src/routes/visualizer/remote).

[dev server link](/visualizer)

![Robe Robin Tetra X inside of the visualizer](./poc-tetrax.png)
8 changes: 7 additions & 1 deletion src/routes/visualizer/remote/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
---
title: Remote
---

# Remote

This poc shows how a minimum implementation of a remote could look like. For more information check out [Visualizer](/src/routes/visualizer).

![creenshot of the PoC](./poc-remote.png)
[dev server link](/visualizer/remote)

![Screenshot of the PoC](./poc-remote.png)
6 changes: 6 additions & 0 deletions src/routes/webSocketDemo/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
---
title: WebSocket Demo
---

# WebSocket Demo

This is a minimal example of establishing a WebSocket connection to the server the page is retrieved from. Using Socket.IO it inititates the connection in `polling` mode and then upgrades it to `websocket` or even `webtransport` when there will be support for it in the future.

Upon connection the WebSocket Server greets the client with a warm and welcoming `Hello, World 👋` message in the terminal and states the connection status as `Connected`.

[dev server link](/webSocketDemo)
16 changes: 15 additions & 1 deletion svelte.config.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,25 @@
import adapter from '@sveltejs/adapter-node';
import { vitePreprocess } from '@sveltejs/kit/vite';
import { mdsvex } from 'mdsvex';
import { join, resolve } from 'path';
import { fileURLToPath } from 'url';

const dirname = resolve(fileURLToPath(import.meta.url), '../');

/** @type {import('@sveltejs/kit').Config} */
const config = {
extensions: ['.svelte', '.svx', '.md'],
// Consult https://kit.svelte.dev/docs/integrations#preprocessors
// for more information about preprocessors
preprocess: vitePreprocess(),
preprocess: [
vitePreprocess({}),
mdsvex({
extensions: ['.svx', '.md'],
layout: {
_: join(dirname, './src/routes/md.svelte')
}
})
],

kit: {
// adapter-auto only supports some environments, see https://kit.svelte.dev/docs/adapter-auto for a list.
Expand Down
2 changes: 1 addition & 1 deletion tests/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ import { expect, test } from '@playwright/test';

test('index page has expected h1', async ({ page }) => {
await page.goto('/');
await expect(page.getByRole('heading', { name: 'Welcome to SvelteKit' })).toBeVisible();
await expect(page.getByRole('heading', { name: 'SHIFTY - Vision' })).toBeVisible();
});
1 change: 1 addition & 0 deletions typedoc.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"tsconfig": "tsconfig.docs.json",
// "excludePrivate": true,
"plugin": ["@mxssfd/typedoc-theme"],
"stripYamlFrontmatter": true,
"theme": "my-theme",
"name": "Home",
"visibilityFilters": {
Expand Down
3 changes: 3 additions & 0 deletions vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ export default defineConfig({
server: {
watch: {
ignored: ['**/public/**']
},
fs: {
allow: ['./README.md']
}
},
plugins: [sveltekit(), webSocketServer],
Expand Down