Skip to content

Commit bbf104f

Browse files
committed
🤖 refactor: Phase 7 - Update build configuration
- Updated tsconfig.main.json to include new folder structure - Updated Makefile build dependencies for main.js and preload.js - Updated package.json debug script path - Updated Storybook to look in browser/ folder for stories - Updated jest.config.js coverage exclusions Part of comprehensive src/ reorganization. _Generated with `mux`_
1 parent 7d5cd9b commit bbf104f

File tree

5 files changed

+13
-15
lines changed

5 files changed

+13
-15
lines changed

.storybook/main.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { mergeConfig } from "vite";
33
import path from "path";
44

55
const config: StorybookConfig = {
6-
stories: ["../src/**/*.stories.@(ts|tsx)"],
6+
stories: ["../src/browser/**/*.stories.@(ts|tsx)"],
77
addons: ["@storybook/addon-links", "@storybook/addon-docs", "@storybook/addon-interactions"],
88
framework: {
99
name: "@storybook/react-vite",

Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -159,16 +159,16 @@ build: node_modules/.installed src/version.ts build-renderer build-main build-pr
159159

160160
build-main: node_modules/.installed dist/main.js ## Build main process
161161

162-
dist/main.js: src/version.ts tsconfig.main.json tsconfig.json $(TS_SOURCES)
162+
dist/main.js: src/cli/index.ts src/desktop/main.ts src/version.ts tsconfig.main.json tsconfig.json $(TS_SOURCES)
163163
@echo "Building main process..."
164164
@NODE_ENV=production $(TSGO) -p tsconfig.main.json
165165
@NODE_ENV=production bun x tsc-alias -p tsconfig.main.json
166166

167167
build-preload: node_modules/.installed dist/preload.js ## Build preload script
168168

169-
dist/preload.js: src/preload.ts $(TS_SOURCES)
169+
dist/preload.js: src/desktop/preload.ts $(TS_SOURCES)
170170
@echo "Building preload script..."
171-
@NODE_ENV=production bun build src/preload.ts \
171+
@NODE_ENV=production bun build src/desktop/preload.ts \
172172
--format=cjs \
173173
--target=node \
174174
--external=electron \

jest.config.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,9 @@ module.exports = {
55
collectCoverageFrom: [
66
"src/**/*.ts",
77
"!src/**/*.d.ts",
8-
"!src/preload.ts",
9-
"!src/main.ts", // Exclude main Electron file from coverage
8+
"!src/desktop/preload.ts",
9+
"!src/cli/index.ts",
10+
"!src/desktop/main.ts",
1011
],
1112
setupFilesAfterEnv: ["<rootDir>/tests/setup.ts"],
1213
moduleNameMapper: {

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
"build": "make build",
2323
"start": "make start",
2424
"typecheck": "make typecheck",
25-
"debug": "bun src/debug/index.ts",
25+
"debug": "bun src/cli/debug/index.ts",
2626
"lint": "make lint",
2727
"lint:fix": "make lint-fix",
2828
"fmt": "make fmt",

tsconfig.main.json

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,10 @@
1111
"excludeFiles": ["**/*.d.ts.map"]
1212
},
1313
"include": [
14-
"src/main.ts",
15-
"src/main-server.ts",
16-
"src/main-desktop.ts",
17-
"src/constants/**/*",
18-
"src/web/**/*",
19-
"src/utils/main/**/*",
20-
"src/types/**/*.d.ts"
14+
"src/cli/**/*",
15+
"src/desktop/**/*",
16+
"src/node/**/*",
17+
"src/common/**/*"
2118
],
22-
"exclude": ["src/App.tsx", "src/main.tsx"]
19+
"exclude": ["src/browser/**/*", "src/main.tsx", "src/terminal-window.tsx"]
2320
}

0 commit comments

Comments
 (0)