Skip to content

Commit aa4bc7b

Browse files
feat: integrate Deno for faster frontend builds (8x install, 2.2x build)
- Add deno.yml taskfile with install, dev, build, preview, test commands - Update npm.yml to use deno install (creates node_modules at root) - Update tauri.yml to use deno:install dep and deno run for tauri-cli - Configure deno.jsonc with workspace and nodeModulesDir settings - Hybrid approach: Deno for speed, npm for Vitest/Playwright compatibility Closes #215
1 parent ab22484 commit aa4bc7b

6 files changed

Lines changed: 1501 additions & 18 deletions

File tree

deno.jsonc

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,31 @@
11
{
22
"$schema": "https://deno.land/x/deno/cli/schemas/config-file.v1.json",
33

4+
// Enable node_modules directory for Vite/Vitest/Playwright compatibility
5+
// Creates physical node_modules instead of using Deno's global cache
6+
"nodeModulesDir": "auto",
7+
8+
// Workspace configuration for frontend package
9+
"workspace": ["./app/frontend"],
10+
11+
// Tasks for common operations (use `deno task <name>` to run)
12+
"tasks": {
13+
// Dependency management
14+
"install": "cd app/frontend && deno install --node-modules-dir=auto",
15+
16+
// Development
17+
"dev": "cd app/frontend && deno run -A npm:vite",
18+
"build": "cd app/frontend && deno run -A npm:vite build",
19+
"preview": "cd app/frontend && deno run -A npm:vite preview",
20+
21+
// Testing (requires Node due to worker thread limitations)
22+
// Use npm commands which leverage deno-created node_modules
23+
"test": "cd app/frontend && npm test",
24+
"test:watch": "cd app/frontend && npm run test:watch",
25+
"test:e2e": "cd app/frontend && npx playwright test",
26+
"test:e2e:ui": "cd app/frontend && npx playwright test --ui"
27+
},
28+
429
"lint": {
530
// Include only frontend JavaScript source files
631
"include": [

0 commit comments

Comments
 (0)