Experiment to rebuild Diffuse using web applets.
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

feat: Task to copy types to dist

+35 -1
+1
.gitignore
··· 2 2 .dprc 3 3 dist 4 4 node_modules 5 + public/applets/
+7 -1
deno.json
··· 1 1 { 2 2 "imports": { 3 3 "@picocss/pico": "npm:@picocss/pico@^2.0.6", 4 + "@std/fs": "jsr:@std/fs@^1.0.15", 4 5 "@web-applets/sdk": "npm:@web-applets/sdk@^0.2.6", 5 6 "astro": "npm:astro@^5.4.1", 6 7 "spellcaster": "npm:spellcaster@^5.0.2", ··· 8 9 }, 9 10 "tasks": { 10 11 "astro": "astro", 11 - "build": "astro build", 12 + "astro:build": "astro build", 13 + "build": { 14 + "command": "deno task copy-types", 15 + "dependencies": ["astro:build"] 16 + }, 17 + "copy-types": "deno run --allow-read --allow-write tasks/copy-types.ts", 12 18 "dev": "astro dev" 13 19 }, 14 20 "compilerOptions": {
+15
deno.lock
··· 1 1 { 2 2 "version": "4", 3 3 "specifiers": { 4 + "jsr:@std/fs@1": "1.0.15", 5 + "jsr:@std/fs@^1.0.15": "1.0.15", 6 + "jsr:@std/path@^1.0.8": "1.0.8", 4 7 "npm:@picocss/pico@^2.0.6": "2.0.6", 5 8 "npm:@web-applets/inspector@*": "0.2.6", 6 9 "npm:@web-applets/sdk@~0.2.6": "0.2.6", ··· 11 14 "npm:create-astro@latest": "4.11.1", 12 15 "npm:spellcaster@^5.0.2": "5.0.2", 13 16 "npm:throttle-debounce@^5.0.2": "5.0.2" 17 + }, 18 + "jsr": { 19 + "@std/fs@1.0.15": { 20 + "integrity": "c083fb479889d6440d768e498195c3fc499d426fbf9a6592f98f53884d1d3f41", 21 + "dependencies": [ 22 + "jsr:@std/path" 23 + ] 24 + }, 25 + "@std/path@1.0.8": { 26 + "integrity": "548fa456bb6a04d3c1a1e7477986b6cffbce95102d0bb447c67c4ee70e0364be" 27 + } 14 28 }, 15 29 "npm": { 16 30 "@astrojs/cli-kit@0.4.1": { ··· 2747 2761 }, 2748 2762 "workspace": { 2749 2763 "dependencies": [ 2764 + "jsr:@std/fs@^1.0.15", 2750 2765 "npm:@picocss/pico@^2.0.6", 2751 2766 "npm:@web-applets/sdk@~0.2.6", 2752 2767 "npm:astro@^5.4.1",
src/applets/engine/audio/types.ts src/applets/engine/audio/types.d.ts
src/applets/engine/queue/types.ts src/applets/engine/queue/types.d.ts
+12
tasks/copy-types.ts
··· 1 + import { walk } from "jsr:@std/fs@^1.0"; 2 + 3 + // Copy .d.ts files to dist dir 4 + const it = walk("./src/applets/", { exts: [".d.ts"] }); 5 + 6 + for await (const item of it) { 7 + const target = `dist/${item.path.replace("src/applets/", "")}`; 8 + const targetDir = target.split("/").slice(0, -1).join("/"); 9 + 10 + Deno.mkdirSync(targetDir, { recursive: true }); 11 + Deno.copyFileSync(item.path, target); 12 + }