Steps to get Capacitor working with SvelteKit
- Set up a SvelteKit project as usual.
npm create svelte@latest my-app
cd my-app
npm install
npm run dev -- --open
| --- | |
| import { Image } from "@astrojs/image/components"; | |
| import { findImage } from "~/utils/findImage"; | |
| import { getNormalizedPost } from "~/utils/getNormalizedPost"; | |
| const {} = Astro.props; | |
| const posts = await Astro.glob("~/data/posts/*.md"); // returns an array of posts that live at ./src/pages/post/*.md | |
| const images = new Map(); |
Website & Web APIs
Static (Prerendered)
Desktop App
| #!/usr/bin/env python3 | |
| import sqlite3 | |
| import os.path | |
| # Convert file to blob data | |
| def convertToBinaryData(filename): | |
| with open(filename, 'rb') as file: | |
| blobData = file.read() | |
| return blobData |
| using System.Collections; | |
| using System.Collections.Generic; | |
| using System.IO; | |
| using UnityEngine; | |
| // From https://twodee.org/blog/16691 | |
| public class Screenshotter : MonoBehaviour | |
| { | |
| public RenderTexture renderTexture; |