create-croissant 0.1.39 → 0.1.41

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (164) hide show
  1. package/dist/index.js +5 -5
  2. package/package.json +7 -10
  3. package/template/.oxlintignore +11 -0
  4. package/template/README.md +6 -6
  5. package/template/apps/desktop/README.md +1 -1
  6. package/template/apps/desktop/electron-builder.yml +6 -6
  7. package/template/apps/desktop/electron.vite.config.ts +8 -8
  8. package/template/apps/desktop/package.json +4 -13
  9. package/template/apps/desktop/src/main/index.ts +32 -32
  10. package/template/apps/desktop/src/preload/index.d.ts +3 -3
  11. package/template/apps/desktop/src/preload/index.ts +8 -8
  12. package/template/apps/desktop/src/renderer/src/App.tsx +5 -5
  13. package/template/apps/desktop/src/renderer/src/assets/base.css +4 -4
  14. package/template/apps/desktop/src/renderer/src/assets/main.css +3 -3
  15. package/template/apps/desktop/src/renderer/src/components/Versions.tsx +4 -4
  16. package/template/apps/desktop/src/renderer/src/main.tsx +7 -7
  17. package/template/apps/desktop/tsconfig.json +1 -4
  18. package/template/apps/desktop/tsconfig.node.json +1 -1
  19. package/template/apps/desktop/tsconfig.web.json +4 -11
  20. package/template/apps/mobile/app/(tabs)/_layout.tsx +11 -10
  21. package/template/apps/mobile/app/(tabs)/explore.tsx +29 -27
  22. package/template/apps/mobile/app/(tabs)/index.tsx +25 -24
  23. package/template/apps/mobile/app/_layout.tsx +8 -8
  24. package/template/apps/mobile/app/modal.tsx +6 -6
  25. package/template/apps/mobile/components/external-link.tsx +5 -5
  26. package/template/apps/mobile/components/haptic-tab.tsx +4 -4
  27. package/template/apps/mobile/components/hello-wave.tsx +5 -4
  28. package/template/apps/mobile/components/parallax-scroll-view.tsx +15 -13
  29. package/template/apps/mobile/components/themed-text.tsx +14 -14
  30. package/template/apps/mobile/components/themed-view.tsx +3 -3
  31. package/template/apps/mobile/components/ui/collapsible.tsx +14 -13
  32. package/template/apps/mobile/components/ui/icon-symbol.ios.tsx +4 -4
  33. package/template/apps/mobile/components/ui/icon-symbol.tsx +9 -9
  34. package/template/apps/mobile/constants/theme.ts +19 -19
  35. package/template/apps/mobile/hooks/use-color-scheme.ts +1 -1
  36. package/template/apps/mobile/hooks/use-color-scheme.web.ts +3 -3
  37. package/template/apps/mobile/hooks/use-theme-color.ts +4 -4
  38. package/template/apps/mobile/package.json +3 -6
  39. package/template/apps/mobile/scripts/reset-project.js +2 -2
  40. package/template/apps/mobile/tsconfig.json +2 -9
  41. package/template/apps/platform/drizzle.config.ts +5 -5
  42. package/template/apps/platform/package.json +2 -6
  43. package/template/apps/platform/src/components/app-sidebar.tsx +60 -69
  44. package/template/apps/platform/src/components/login-form.tsx +32 -39
  45. package/template/apps/platform/src/components/search-form.tsx +5 -13
  46. package/template/apps/platform/src/components/signup-form.tsx +39 -49
  47. package/template/apps/platform/src/components/version-switcher.tsx +11 -21
  48. package/template/apps/platform/src/lib/auth-utils.ts +12 -14
  49. package/template/apps/platform/src/lib/orpc.ts +17 -17
  50. package/template/apps/platform/src/routeTree.gen.ts +264 -267
  51. package/template/apps/platform/src/router.tsx +5 -5
  52. package/template/apps/platform/src/routes/__root.tsx +13 -15
  53. package/template/apps/platform/src/routes/_auth/account.tsx +61 -50
  54. package/template/apps/platform/src/routes/_auth/dashboard.tsx +17 -17
  55. package/template/apps/platform/src/routes/_auth/examples/client-orpc-auth.tsx +13 -13
  56. package/template/apps/platform/src/routes/_auth/examples/ssr-orpc-auth.tsx +17 -17
  57. package/template/apps/platform/src/routes/_auth.tsx +5 -5
  58. package/template/apps/platform/src/routes/_public/examples/client-orpc.tsx +108 -88
  59. package/template/apps/platform/src/routes/_public/examples/isr.tsx +14 -14
  60. package/template/apps/platform/src/routes/_public/examples/ssr-orpc.tsx +92 -75
  61. package/template/apps/platform/src/routes/_public/index.tsx +22 -19
  62. package/template/apps/platform/src/routes/_public/login.tsx +4 -4
  63. package/template/apps/platform/src/routes/_public/signup.tsx +6 -5
  64. package/template/apps/platform/src/routes/_public.tsx +5 -5
  65. package/template/apps/platform/src/routes/api/auth/$.ts +13 -13
  66. package/template/apps/platform/src/routes/api/rpc.$.ts +13 -13
  67. package/template/apps/platform/tsconfig.json +1 -1
  68. package/template/apps/platform/vite.config.ts +8 -8
  69. package/template/docker-compose.yml +1 -1
  70. package/template/package.json +24 -22
  71. package/template/packages/auth/package.json +8 -12
  72. package/template/packages/auth/src/lib/auth.ts +1 -1
  73. package/template/packages/auth/tsconfig.json +1 -1
  74. package/template/packages/db/package.json +6 -10
  75. package/template/packages/db/src/index.ts +4 -4
  76. package/template/packages/db/src/schema.ts +2 -2
  77. package/template/packages/db/tsconfig.json +1 -1
  78. package/template/packages/orpc/package.json +6 -10
  79. package/template/packages/orpc/src/lib/planets.ts +39 -43
  80. package/template/packages/orpc/src/lib/router.ts +15 -15
  81. package/template/packages/orpc/tsconfig.json +1 -1
  82. package/template/packages/ui/package.json +8 -12
  83. package/template/packages/ui/src/components/accordion.tsx +20 -22
  84. package/template/packages/ui/src/components/alert-dialog.tsx +31 -56
  85. package/template/packages/ui/src/components/alert.tsx +15 -23
  86. package/template/packages/ui/src/components/aspect-ratio.tsx +3 -3
  87. package/template/packages/ui/src/components/avatar.tsx +19 -35
  88. package/template/packages/ui/src/components/badge.tsx +13 -17
  89. package/template/packages/ui/src/components/breadcrumb.tsx +22 -44
  90. package/template/packages/ui/src/components/button-group.tsx +16 -25
  91. package/template/packages/ui/src/components/button.tsx +8 -9
  92. package/template/packages/ui/src/components/calendar.tsx +43 -82
  93. package/template/packages/ui/src/components/card.tsx +15 -26
  94. package/template/packages/ui/src/components/carousel.tsx +70 -78
  95. package/template/packages/ui/src/components/chart.tsx +84 -117
  96. package/template/packages/ui/src/components/checkbox.tsx +8 -9
  97. package/template/packages/ui/src/components/collapsible.tsx +5 -9
  98. package/template/packages/ui/src/components/combobox.tsx +44 -68
  99. package/template/packages/ui/src/components/command.tsx +32 -47
  100. package/template/packages/ui/src/components/context-menu.tsx +45 -71
  101. package/template/packages/ui/src/components/dialog.tsx +29 -51
  102. package/template/packages/ui/src/components/direction.tsx +1 -4
  103. package/template/packages/ui/src/components/drawer.tsx +24 -38
  104. package/template/packages/ui/src/components/dropdown-menu.tsx +45 -55
  105. package/template/packages/ui/src/components/empty.tsx +16 -27
  106. package/template/packages/ui/src/components/field.tsx +49 -63
  107. package/template/packages/ui/src/components/hover-card.tsx +9 -14
  108. package/template/packages/ui/src/components/input-group.tsx +40 -52
  109. package/template/packages/ui/src/components/input-otp.tsx +17 -18
  110. package/template/packages/ui/src/components/input.tsx +6 -6
  111. package/template/packages/ui/src/components/item.tsx +31 -44
  112. package/template/packages/ui/src/components/kbd.tsx +5 -5
  113. package/template/packages/ui/src/components/label.tsx +6 -6
  114. package/template/packages/ui/src/components/menubar.tsx +51 -64
  115. package/template/packages/ui/src/components/mode-toggle.tsx +9 -15
  116. package/template/packages/ui/src/components/native-select.tsx +18 -24
  117. package/template/packages/ui/src/components/navigation-menu.tsx +28 -35
  118. package/template/packages/ui/src/components/pagination.tsx +19 -31
  119. package/template/packages/ui/src/components/popover.tsx +13 -26
  120. package/template/packages/ui/src/components/progress.tsx +13 -30
  121. package/template/packages/ui/src/components/radio-group.tsx +7 -7
  122. package/template/packages/ui/src/components/resizable.tsx +12 -20
  123. package/template/packages/ui/src/components/scroll-area.tsx +8 -12
  124. package/template/packages/ui/src/components/select.tsx +31 -42
  125. package/template/packages/ui/src/components/separator.tsx +6 -10
  126. package/template/packages/ui/src/components/sheet.tsx +25 -38
  127. package/template/packages/ui/src/components/sidebar.tsx +137 -170
  128. package/template/packages/ui/src/components/skeleton.tsx +3 -3
  129. package/template/packages/ui/src/components/slider.tsx +5 -5
  130. package/template/packages/ui/src/components/sonner.tsx +20 -24
  131. package/template/packages/ui/src/components/spinner.tsx +10 -5
  132. package/template/packages/ui/src/components/switch.tsx +6 -6
  133. package/template/packages/ui/src/components/table.tsx +18 -45
  134. package/template/packages/ui/src/components/tabs.tsx +14 -22
  135. package/template/packages/ui/src/components/textarea.tsx +5 -5
  136. package/template/packages/ui/src/components/theme-provider.tsx +43 -48
  137. package/template/packages/ui/src/components/toggle-group.tsx +18 -20
  138. package/template/packages/ui/src/components/toggle.tsx +9 -10
  139. package/template/packages/ui/src/components/tooltip.tsx +10 -22
  140. package/template/packages/ui/src/hooks/use-mobile.ts +11 -11
  141. package/template/packages/ui/src/lib/utils.ts +4 -4
  142. package/template/packages/ui/src/styles/globals.css +106 -106
  143. package/template/packages/ui/tsconfig.json +1 -1
  144. package/template/turbo.json +15 -6
  145. package/template/.prettierignore +0 -10
  146. package/template/apps/desktop/.prettierignore +0 -6
  147. package/template/apps/desktop/eslint.config.ts +0 -11
  148. package/template/apps/desktop/prettier.config.ts +0 -3
  149. package/template/apps/mobile/eslint.config.js +0 -10
  150. package/template/apps/platform/eslint.config.ts +0 -11
  151. package/template/apps/platform/prettier.config.ts +0 -3
  152. package/template/packages/auth/eslint.config.ts +0 -3
  153. package/template/packages/auth/prettier.config.ts +0 -3
  154. package/template/packages/config-eslint/index.ts +0 -24
  155. package/template/packages/config-eslint/package.json +0 -11
  156. package/template/packages/config-prettier/index.ts +0 -14
  157. package/template/packages/config-prettier/package.json +0 -7
  158. package/template/packages/db/eslint.config.ts +0 -3
  159. package/template/packages/db/prettier.config.ts +0 -3
  160. package/template/packages/orpc/eslint.config.ts +0 -3
  161. package/template/packages/orpc/prettier.config.ts +0 -3
  162. package/template/packages/ui/eslint.config.ts +0 -3
  163. package/template/packages/ui/prettier.config.ts +0 -3
  164. package/template/prettier.config.ts +0 -15
package/dist/index.js CHANGED
@@ -1,9 +1,9 @@
1
1
  #!/usr/bin/env node
2
- import n from"path";import{fileURLToPath as k}from"url";import r from"chalk";import{Command as y}from"commander";import{execa as j}from"execa";import e from"fs-extra";import P from"inquirer";import u from"ora";var b=k(import.meta.url),g=n.dirname(b),h=new y;h.name("create-croissant").description("Scaffold a new project using the Croissant Stack").argument("[project-name]","Name of the project").action(async m=>{console.log(r.bold.yellow(`
2
+ import s from"path";import{fileURLToPath as k}from"url";import i from"chalk";import{Command as y}from"commander";import{execa as j}from"execa";import e from"fs-extra";import P from"inquirer";import u from"ora";var b=k(import.meta.url),g=s.dirname(b),h=new y;h.name("create-croissant").description("Scaffold a new project using the Croissant Stack").argument("[project-name]","Name of the project").action(async m=>{console.log(i.bold.yellow(`
3
3
  \u{1F950} Welcome to the Croissant Stack!
4
- `));let l=await P.prompt([{type:"input",name:"name",message:"What is your project named?",default:m||"my-croissant-app",when:!m},{type:"confirm",name:"install",message:"Would you like to install dependencies?",default:!0},{type:"confirm",name:"mobile",message:"Would you like to include the mobile app (Expo)?",default:!0},{type:"confirm",name:"desktop",message:"Would you like to include the desktop app (Electron)?",default:!0}]),c=m||l.name,o=n.resolve(process.cwd(),c);e.existsSync(o)&&(console.error(r.red(`
4
+ `));let l=await P.prompt([{type:"input",name:"name",message:"What is your project named?",default:m||"my-croissant-app",when:!m},{type:"confirm",name:"install",message:"Would you like to install dependencies?",default:!0},{type:"confirm",name:"mobile",message:"Would you like to include the mobile app (Expo)?",default:!0},{type:"confirm",name:"desktop",message:"Would you like to include the desktop app (Electron)?",default:!0}]),c=m||l.name,o=s.resolve(process.cwd(),c);e.existsSync(o)&&(console.error(i.red(`
5
5
  Error: Directory ${c} already exists.
6
- `)),process.exit(1));let f=u("Scaffolding your project...").start();try{await e.ensureDir(o);let p=n.join(g,"..","template");if(await e.pathExists(p))await e.copy(p,o);else{let t=n.resolve(g,"../../.."),s=["node_modules","dist",".git","packages/create-croissant",".turbo","package-lock.json"];await e.copy(t,o,{filter:a=>{let i=n.relative(t,a);return!s.some(w=>i.startsWith(w))}})}if(!l.mobile){let t=n.join(o,"apps/mobile");if(await e.pathExists(t)){await e.remove(t);let s=n.join(o,"package.json");if(await e.pathExists(s)){let a=await e.readJson(s);a.scripts&&Object.keys(a.scripts).forEach(i=>{i.includes("mobile")&&delete a.scripts[i]}),await e.writeJson(s,a,{spaces:2})}}}if(!l.desktop){let t=n.join(o,"apps/desktop");if(await e.pathExists(t)){await e.remove(t);let s=n.join(o,"package.json");if(await e.pathExists(s)){let a=await e.readJson(s);a.scripts&&Object.keys(a.scripts).forEach(i=>{i.includes("desktop")&&delete a.scripts[i]}),await e.writeJson(s,a,{spaces:2})}}}let d=n.join(o,"package.json");if(await e.pathExists(d)){let t=await e.readJson(d);t.name=c,t.version="0.1.0",delete t.private,await e.writeJson(d,t,{spaces:2})}if(f.succeed(r.green(`Project ${c} created at ${o}`)),l.install){let t=u("Installing dependencies...").start();try{await j("npm",["install"],{cwd:o}),t.succeed(r.green("Dependencies installed!"))}catch{t.fail(r.red("Failed to install dependencies. You may need to run npm install manually."))}}console.log(r.bold.cyan(`
6
+ `)),process.exit(1));let f=u("Scaffolding your project...").start();try{await e.ensureDir(o);let p=s.join(g,"..","template");if(await e.pathExists(p))await e.copy(p,o);else{let t=s.resolve(g,"../../.."),n=["node_modules","dist",".git","packages/create-croissant",".turbo","package-lock.json"];await e.copy(t,o,{filter:a=>{let r=s.relative(t,a);return!n.some(w=>r.startsWith(w))}})}if(!l.mobile){let t=s.join(o,"apps/mobile");if(await e.pathExists(t)){await e.remove(t);let n=s.join(o,"package.json");if(await e.pathExists(n)){let a=await e.readJson(n);a.scripts&&Object.keys(a.scripts).forEach(r=>{r.includes("mobile")&&delete a.scripts[r]}),await e.writeJson(n,a,{spaces:2})}}}if(!l.desktop){let t=s.join(o,"apps/desktop");if(await e.pathExists(t)){await e.remove(t);let n=s.join(o,"package.json");if(await e.pathExists(n)){let a=await e.readJson(n);a.scripts&&Object.keys(a.scripts).forEach(r=>{r.includes("desktop")&&delete a.scripts[r]}),await e.writeJson(n,a,{spaces:2})}}}let d=s.join(o,"package.json");if(await e.pathExists(d)){let t=await e.readJson(d);t.name=c,t.version="0.1.0",delete t.private,await e.writeJson(d,t,{spaces:2})}if(f.succeed(i.green(`Project ${c} created at ${o}`)),l.install){let t=u("Installing dependencies...").start();try{await j("npm",["install"],{cwd:o}),t.succeed(i.green("Dependencies installed!"))}catch{t.fail(i.red("Failed to install dependencies. You may need to run npm install manually."))}}console.log(i.bold.cyan(`
7
7
  Next steps:`)),console.log(` cd ${c}`),console.log(" npm run db:up # Start your PostgreSQL database"),console.log(` npm run dev # Start development server
8
- `),console.log(r.yellow(`Happy hacking! \u{1F950}
9
- `))}catch(p){f.fail(r.red("An error occurred during scaffolding.")),console.error(p),process.exit(1)}});h.parse(process.argv);
8
+ `),console.log(i.yellow(`Happy hacking! \u{1F950}
9
+ `))}catch(p){f.fail(i.red("An error occurred during scaffolding.")),console.error(p),process.exit(1)}});h.parse(process.argv);
package/package.json CHANGED
@@ -1,17 +1,12 @@
1
1
  {
2
2
  "name": "create-croissant",
3
- "publishConfig": {
4
- "access": "public"
5
- },
6
- "version": "0.1.39",
3
+ "version": "0.1.41",
7
4
  "description": "Scaffold a new project using the Croissant Stack",
8
5
  "repository": {
9
6
  "type": "git",
10
7
  "url": "https://github.com/croissantsam/croissant-stack.git",
11
8
  "directory": "packages/create-croissant"
12
9
  },
13
- "main": "./dist/index.js",
14
- "type": "module",
15
10
  "bin": {
16
11
  "create-croissant": "./dist/index.js"
17
12
  },
@@ -19,10 +14,14 @@
19
14
  "dist",
20
15
  "template"
21
16
  ],
17
+ "type": "module",
18
+ "main": "./dist/index.js",
19
+ "publishConfig": {
20
+ "access": "public"
21
+ },
22
22
  "scripts": {
23
23
  "build": "npm run prepare-template && tsup src/index.ts --format esm --clean --minify",
24
24
  "dev": "tsup src/index.ts --format esm --watch",
25
- "lint": "eslint src",
26
25
  "typecheck": "tsc --noEmit",
27
26
  "prepare-template": "node scripts/prepare-template.js"
28
27
  },
@@ -35,12 +34,10 @@
35
34
  "ora": "^9.4.0"
36
35
  },
37
36
  "devDependencies": {
38
- "@workspace/config-eslint": "*",
39
- "@workspace/config-typescript": "*",
40
- "@workspace/config-prettier": "*",
41
37
  "@types/fs-extra": "^11.0.4",
42
38
  "@types/inquirer": "^9.0.9",
43
39
  "@types/node": "^25.6.0",
40
+ "@workspace/config-typescript": "*",
44
41
  "tsup": "^8.5.1"
45
42
  }
46
43
  }
@@ -0,0 +1,11 @@
1
+ node_modules
2
+ dist
3
+ .turbo
4
+ .vercel
5
+ .output
6
+ .nitro
7
+ .tanstack
8
+ .vinxi
9
+ coverage
10
+ apps/platform/src/routeTree.gen.ts
11
+ packages/create-croissant/template
@@ -97,8 +97,8 @@ All scripts are orchestrated by Turborepo. You can run them from the root direct
97
97
 
98
98
  - `npm run dev`: Start all applications in development mode.
99
99
  - `npm run build`: Build all applications for production.
100
- - `npm run lint`: Lint all packages (uses Turbo's caching).
101
- - `npm run format`: Format all packages using Prettier.
100
+ - `npm run quality`: Run all quality checks (linting and formatting) using Oxc.
101
+ - `npm run quality:fix`: Automatically fix linting and formatting issues using Oxc.
102
102
  - `npm run typecheck`: Run TypeScript type checking across the workspace.
103
103
 
104
104
  ### 🗄️ Database Scripts
@@ -133,11 +133,11 @@ The project uses oRPC for end-to-end type safety. The router is modularized for
133
133
  On the client side, you can infer types directly from the router:
134
134
 
135
135
  ```typescript
136
- import type { router } from "@workspace/orpc/router"
137
- import type { InferRouterInputs, InferRouterOutputs } from "@orpc/server"
136
+ import type { router } from "@workspace/orpc/router";
137
+ import type { InferRouterInputs, InferRouterOutputs } from "@orpc/server";
138
138
 
139
- type Inputs = InferRouterInputs<typeof router>
140
- type Outputs = InferRouterOutputs<typeof router>
139
+ type Inputs = InferRouterInputs<typeof router>;
140
+ type Outputs = InferRouterOutputs<typeof router>;
141
141
  ```
142
142
 
143
143
  ## 🧱 Adding Components
@@ -4,7 +4,7 @@ An Electron application with React and TypeScript
4
4
 
5
5
  ## Recommended IDE Setup
6
6
 
7
- - [VSCode](https://code.visualstudio.com/) + [ESLint](https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint) + [Prettier](https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode)
7
+ - [VSCode](https://code.visualstudio.com/)
8
8
 
9
9
  ## Project Setup
10
10
 
@@ -3,12 +3,12 @@ productName: desktop
3
3
  directories:
4
4
  buildResources: build
5
5
  files:
6
- - '!**/.vscode/*'
7
- - '!src/*'
8
- - '!electron.vite.config.{js,ts,mjs,cjs}'
9
- - '!{.eslintcache,eslint.config.mjs,.prettierignore,.prettierrc.yaml,dev-app-update.yml,CHANGELOG.md,README.md}'
10
- - '!{.env,.env.*,.npmrc,pnpm-lock.yaml}'
11
- - '!{tsconfig.json,tsconfig.node.json,tsconfig.web.json}'
6
+ - "!**/.vscode/*"
7
+ - "!src/*"
8
+ - "!electron.vite.config.{js,ts,mjs,cjs}"
9
+ - "!{dev-app-update.yml,CHANGELOG.md,README.md}"
10
+ - "!{.env,.env.*,.npmrc,pnpm-lock.yaml}"
11
+ - "!{tsconfig.json,tsconfig.node.json,tsconfig.web.json}"
12
12
  asarUnpack:
13
13
  - resources/**
14
14
  win:
@@ -1,6 +1,6 @@
1
- import { resolve } from 'node:path'
2
- import { defineConfig } from 'electron-vite'
3
- import react from '@vitejs/plugin-react'
1
+ import { resolve } from "node:path";
2
+ import { defineConfig } from "electron-vite";
3
+ import react from "@vitejs/plugin-react";
4
4
 
5
5
  export default defineConfig({
6
6
  main: {},
@@ -8,9 +8,9 @@ export default defineConfig({
8
8
  renderer: {
9
9
  resolve: {
10
10
  alias: {
11
- '@renderer': resolve('src/renderer/src')
12
- }
11
+ "@renderer": resolve("src/renderer/src"),
12
+ },
13
13
  },
14
- plugins: [react()]
15
- }
16
- })
14
+ plugins: [react()],
15
+ },
16
+ });
@@ -2,12 +2,10 @@
2
2
  "name": "desktop",
3
3
  "version": "1.0.0",
4
4
  "description": "An Electron application with React and TypeScript",
5
- "main": "./out/main/index.js",
6
- "author": "example.com",
7
5
  "homepage": "https://electron-vite.org",
6
+ "author": "example.com",
7
+ "main": "./out/main/index.js",
8
8
  "scripts": {
9
- "format": "prettier --write .",
10
- "lint": "eslint --cache .",
11
9
  "typecheck:node": "tsc --noEmit -p tsconfig.node.json --composite false",
12
10
  "typecheck:web": "tsc --noEmit -p tsconfig.web.json --composite false",
13
11
  "typecheck": "npm run typecheck:node && npm run typecheck:web",
@@ -26,19 +24,12 @@
26
24
  "electron-updater": "^6.3.9"
27
25
  },
28
26
  "devDependencies": {
29
- "@workspace/config-eslint": "*",
30
- "@workspace/config-typescript": "*",
31
- "@workspace/config-prettier": "*",
32
- "@electron-toolkit/eslint-config-prettier": "^3.0.0",
33
- "@electron-toolkit/eslint-config-ts": "^3.1.0",
34
27
  "@electron-toolkit/tsconfig": "^2.0.0",
35
28
  "@types/node": "^22.19.1",
36
29
  "@vitejs/plugin-react": "^5.1.1",
30
+ "@workspace/config-typescript": "*",
37
31
  "electron": "39.8.9",
38
32
  "electron-builder": "^26.0.12",
39
- "electron-vite": "^5.0.0",
40
- "eslint-plugin-react": "^7.37.5",
41
- "eslint-plugin-react-hooks": "^7.1.1",
42
- "eslint-plugin-react-refresh": "^0.5.2"
33
+ "electron-vite": "^5.0.0"
43
34
  }
44
35
  }
@@ -1,7 +1,7 @@
1
- import { join } from 'node:path'
2
- import { BrowserWindow, app, ipcMain, shell } from 'electron'
3
- import { electronApp, is, optimizer } from '@electron-toolkit/utils'
4
- import icon from '../../resources/icon.png?asset'
1
+ import { join } from "node:path";
2
+ import { BrowserWindow, app, ipcMain, shell } from "electron";
3
+ import { electronApp, is, optimizer } from "@electron-toolkit/utils";
4
+ import icon from "../../resources/icon.png?asset";
5
5
 
6
6
  function createWindow(): void {
7
7
  // Create the browser window.
@@ -10,28 +10,28 @@ function createWindow(): void {
10
10
  height: 670,
11
11
  show: false,
12
12
  autoHideMenuBar: true,
13
- ...(process.platform === 'linux' ? { icon } : {}),
13
+ ...(process.platform === "linux" ? { icon } : {}),
14
14
  webPreferences: {
15
- preload: join(__dirname, '../preload/index.js'),
16
- sandbox: false
17
- }
18
- })
15
+ preload: join(__dirname, "../preload/index.js"),
16
+ sandbox: false,
17
+ },
18
+ });
19
19
 
20
- mainWindow.on('ready-to-show', () => {
21
- mainWindow.show()
22
- })
20
+ mainWindow.on("ready-to-show", () => {
21
+ mainWindow.show();
22
+ });
23
23
 
24
24
  mainWindow.webContents.setWindowOpenHandler((details) => {
25
- shell.openExternal(details.url)
26
- return { action: 'deny' }
27
- })
25
+ shell.openExternal(details.url);
26
+ return { action: "deny" };
27
+ });
28
28
 
29
29
  // HMR for renderer base on electron-vite cli.
30
30
  // Load the remote URL for development or the local html file for production.
31
- if (is.dev && process.env['ELECTRON_RENDERER_URL']) {
32
- mainWindow.loadURL(process.env['ELECTRON_RENDERER_URL'])
31
+ if (is.dev && process.env["ELECTRON_RENDERER_URL"]) {
32
+ mainWindow.loadURL(process.env["ELECTRON_RENDERER_URL"]);
33
33
  } else {
34
- mainWindow.loadFile(join(__dirname, '../renderer/index.html'))
34
+ mainWindow.loadFile(join(__dirname, "../renderer/index.html"));
35
35
  }
36
36
  }
37
37
 
@@ -40,35 +40,35 @@ function createWindow(): void {
40
40
  // Some APIs can only be used after this event occurs.
41
41
  app.whenReady().then(() => {
42
42
  // Set app user model id for windows
43
- electronApp.setAppUserModelId('com.electron')
43
+ electronApp.setAppUserModelId("com.electron");
44
44
 
45
45
  // Default open or close DevTools by F12 in development
46
46
  // and ignore CommandOrControl + R in production.
47
47
  // see https://github.com/alex8088/electron-toolkit/tree/master/packages/utils
48
- app.on('browser-window-created', (_, window) => {
49
- optimizer.watchWindowShortcuts(window)
50
- })
48
+ app.on("browser-window-created", (_, window) => {
49
+ optimizer.watchWindowShortcuts(window);
50
+ });
51
51
 
52
52
  // IPC test
53
- ipcMain.on('ping', () => console.log('pong'))
53
+ ipcMain.on("ping", () => console.log("pong"));
54
54
 
55
- createWindow()
55
+ createWindow();
56
56
 
57
- app.on('activate', function () {
57
+ app.on("activate", function () {
58
58
  // On macOS it's common to re-create a window in the app when the
59
59
  // dock icon is clicked and there are no other windows open.
60
- if (BrowserWindow.getAllWindows().length === 0) createWindow()
61
- })
62
- })
60
+ if (BrowserWindow.getAllWindows().length === 0) createWindow();
61
+ });
62
+ });
63
63
 
64
64
  // Quit when all windows are closed, except on macOS. There, it's common
65
65
  // for applications and their menu bar to stay active until the user quits
66
66
  // explicitly with Cmd + Q.
67
- app.on('window-all-closed', () => {
68
- if (process.platform !== 'darwin') {
69
- app.quit()
67
+ app.on("window-all-closed", () => {
68
+ if (process.platform !== "darwin") {
69
+ app.quit();
70
70
  }
71
- })
71
+ });
72
72
 
73
73
  // In this file you can include the rest of your app's specific main process
74
74
  // code. You can also put them in separate files and require them here.
@@ -1,8 +1,8 @@
1
- import type { ElectronAPI } from '@electron-toolkit/preload'
1
+ import type { ElectronAPI } from "@electron-toolkit/preload";
2
2
 
3
3
  declare global {
4
4
  interface Window {
5
- electron: ElectronAPI
6
- api: unknown
5
+ electron: ElectronAPI;
6
+ api: unknown;
7
7
  }
8
8
  }
@@ -1,22 +1,22 @@
1
- import { contextBridge } from 'electron'
2
- import { electronAPI } from '@electron-toolkit/preload'
1
+ import { contextBridge } from "electron";
2
+ import { electronAPI } from "@electron-toolkit/preload";
3
3
 
4
4
  // Custom APIs for renderer
5
- const api = {}
5
+ const api = {};
6
6
 
7
7
  // Use `contextBridge` APIs to expose Electron APIs to
8
8
  // renderer only if context isolation is enabled, otherwise
9
9
  // just add to the DOM global.
10
10
  if (process.contextIsolated) {
11
11
  try {
12
- contextBridge.exposeInMainWorld('electron', electronAPI)
13
- contextBridge.exposeInMainWorld('api', api)
12
+ contextBridge.exposeInMainWorld("electron", electronAPI);
13
+ contextBridge.exposeInMainWorld("api", api);
14
14
  } catch (error) {
15
- console.error(error)
15
+ console.error(error);
16
16
  }
17
17
  } else {
18
18
  // @ts-ignore (define in dts)
19
- window.electron = electronAPI
19
+ window.electron = electronAPI;
20
20
  // @ts-ignore (define in dts)
21
- window.api = api
21
+ window.api = api;
22
22
  }
@@ -1,8 +1,8 @@
1
- import Versions from './components/Versions'
2
- import electronLogo from './assets/electron.svg'
1
+ import Versions from "./components/Versions";
2
+ import electronLogo from "./assets/electron.svg";
3
3
 
4
4
  function App(): React.JSX.Element {
5
- const ipcHandle = (): void => window.electron.ipcRenderer.send('ping')
5
+ const ipcHandle = (): void => window.electron.ipcRenderer.send("ping");
6
6
 
7
7
  return (
8
8
  <>
@@ -29,7 +29,7 @@ function App(): React.JSX.Element {
29
29
  </div>
30
30
  <Versions></Versions>
31
31
  </>
32
- )
32
+ );
33
33
  }
34
34
 
35
- export default App
35
+ export default App;
@@ -52,14 +52,14 @@ body {
52
52
  Inter,
53
53
  -apple-system,
54
54
  BlinkMacSystemFont,
55
- 'Segoe UI',
55
+ "Segoe UI",
56
56
  Roboto,
57
57
  Oxygen,
58
58
  Ubuntu,
59
59
  Cantarell,
60
- 'Fira Sans',
61
- 'Droid Sans',
62
- 'Helvetica Neue',
60
+ "Fira Sans",
61
+ "Droid Sans",
62
+ "Helvetica Neue",
63
63
  sans-serif;
64
64
  text-rendering: optimizeLegibility;
65
65
  -webkit-font-smoothing: antialiased;
@@ -1,11 +1,11 @@
1
- @import './base.css';
1
+ @import "./base.css";
2
2
 
3
3
  body {
4
4
  display: flex;
5
5
  align-items: center;
6
6
  justify-content: center;
7
7
  overflow: hidden;
8
- background-image: url('./wavy-lines.svg');
8
+ background-image: url("./wavy-lines.svg");
9
9
  background-size: cover;
10
10
  user-select: none;
11
11
  }
@@ -129,7 +129,7 @@ code {
129
129
  bottom: 30px;
130
130
  margin: 0 auto;
131
131
  padding: 15px 0;
132
- font-family: 'Menlo', 'Lucida Console', monospace;
132
+ font-family: "Menlo", "Lucida Console", monospace;
133
133
  display: inline-flex;
134
134
  overflow: hidden;
135
135
  align-items: center;
@@ -1,7 +1,7 @@
1
- import { useState } from 'react'
1
+ import { useState } from "react";
2
2
 
3
3
  function Versions(): React.JSX.Element {
4
- const [versions] = useState(window.electron.process.versions)
4
+ const [versions] = useState(window.electron.process.versions);
5
5
 
6
6
  return (
7
7
  <ul className="versions">
@@ -9,7 +9,7 @@ function Versions(): React.JSX.Element {
9
9
  <li className="chrome-version">Chromium v{versions.chrome}</li>
10
10
  <li className="node-version">Node v{versions.node}</li>
11
11
  </ul>
12
- )
12
+ );
13
13
  }
14
14
 
15
- export default Versions
15
+ export default Versions;
@@ -1,11 +1,11 @@
1
- import './assets/main.css'
1
+ import "./assets/main.css";
2
2
 
3
- import { StrictMode } from 'react'
4
- import { createRoot } from 'react-dom/client'
5
- import App from './App'
3
+ import { StrictMode } from "react";
4
+ import { createRoot } from "react-dom/client";
5
+ import App from "./App";
6
6
 
7
- createRoot(document.getElementById('root')!).render(
7
+ createRoot(document.getElementById("root")!).render(
8
8
  <StrictMode>
9
9
  <App />
10
- </StrictMode>
11
- )
10
+ </StrictMode>,
11
+ );
@@ -1,9 +1,6 @@
1
1
  {
2
2
  "files": [],
3
- "references": [
4
- { "path": "./tsconfig.node.json" },
5
- { "path": "./tsconfig.web.json" }
6
- ],
3
+ "references": [{ "path": "./tsconfig.node.json" }, { "path": "./tsconfig.web.json" }],
7
4
  "include": [],
8
5
  "exclude": ["node_modules", "out", "dist"]
9
6
  }
@@ -4,5 +4,5 @@
4
4
  "composite": true,
5
5
  "types": ["electron-vite/node"]
6
6
  },
7
- "include": ["src/main/**/*", "src/preload/**/*", "electron.vite.config.ts", "eslint.config.ts", "prettier.config.ts"]
7
+ "include": ["src/main/**/*", "src/preload/**/*", "electron.vite.config.ts"]
8
8
  }
@@ -5,21 +5,14 @@
5
5
  "src/renderer/src/**/*",
6
6
  "src/renderer/src/**/*.tsx",
7
7
  "src/preload/*.d.ts",
8
- "electron.vite.config.ts",
9
- "prettier.config.js"
8
+ "electron.vite.config.ts"
10
9
  ],
11
10
  "compilerOptions": {
12
11
  "composite": true,
13
12
  "paths": {
14
- "@renderer/*": [
15
- "./src/renderer/src/*"
16
- ],
17
- "@main/*": [
18
- "./src/main/src/*"
19
- ],
20
- "@preload/*": [
21
- "./src/preload/src/*"
22
- ]
13
+ "@renderer/*": ["./src/renderer/src/*"],
14
+ "@main/*": ["./src/main/src/*"],
15
+ "@preload/*": ["./src/preload/src/*"]
23
16
  }
24
17
  }
25
18
  }
@@ -1,10 +1,10 @@
1
- import { Tabs } from 'expo-router';
2
- import React from 'react';
1
+ import { Tabs } from "expo-router";
2
+ import React from "react";
3
3
 
4
- import { HapticTab } from '@/components/haptic-tab';
5
- import { IconSymbol } from '@/components/ui/icon-symbol';
6
- import { Colors } from '@/constants/theme';
7
- import { useColorScheme } from '@/hooks/use-color-scheme';
4
+ import { HapticTab } from "@/components/haptic-tab";
5
+ import { IconSymbol } from "@/components/ui/icon-symbol";
6
+ import { Colors } from "@/constants/theme";
7
+ import { useColorScheme } from "@/hooks/use-color-scheme";
8
8
 
9
9
  export default function TabLayout() {
10
10
  const colorScheme = useColorScheme();
@@ -12,21 +12,22 @@ export default function TabLayout() {
12
12
  return (
13
13
  <Tabs
14
14
  screenOptions={{
15
- tabBarActiveTintColor: Colors[colorScheme ?? 'light'].tint,
15
+ tabBarActiveTintColor: Colors[colorScheme ?? "light"].tint,
16
16
  headerShown: false,
17
17
  tabBarButton: HapticTab,
18
- }}>
18
+ }}
19
+ >
19
20
  <Tabs.Screen
20
21
  name="index"
21
22
  options={{
22
- title: 'Home',
23
+ title: "Home",
23
24
  tabBarIcon: ({ color }) => <IconSymbol size={28} name="house.fill" color={color} />,
24
25
  }}
25
26
  />
26
27
  <Tabs.Screen
27
28
  name="explore"
28
29
  options={{
29
- title: 'Explore',
30
+ title: "Explore",
30
31
  tabBarIcon: ({ color }) => <IconSymbol size={28} name="paperplane.fill" color={color} />,
31
32
  }}
32
33
  />