Skip to content

Commit

Permalink
fix: web ui build
Browse files Browse the repository at this point in the history
  • Loading branch information
fbwoolf committed Aug 27, 2024
1 parent 29ff533 commit be283c5
Show file tree
Hide file tree
Showing 10 changed files with 36 additions and 20 deletions.
1 change: 0 additions & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ pnpm-lock.yaml
.eslintrc.js
dist/
dist-native/
dist-all/
dist-web/
.turbo/
.tsup/
Expand Down
2 changes: 1 addition & 1 deletion .ls-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ ignore:
- .git
- dist
- apps/mobile/.expo/*
- packages/ui/dist-all
- packages/ui/dist-web
- node_modules
- packages/*/node_modules
- apps/*/node_modules
Expand Down
1 change: 0 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ pnpm-lock.yaml
.tsup/
dist/
dist-native/
dist-all/
dist-web/
leather-styles/
package.json
Expand Down
1 change: 0 additions & 1 deletion packages/ui/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ yarn-error.*

# typescript
*.tsbuildinfo
dist-all/
dist-web/
dist-native/

Expand Down
1 change: 0 additions & 1 deletion packages/ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
"scripts": {
"build": "pnpm panda && pnpm build:native && pnpm build:web",
"build-storybook:web": "storybook build -c ./src/.storybook-web",
"build:all": "tsc --build ./tsconfig.json",
"build:native": "tsup --config tsup.config.native.ts",
"build:watch": "concurrently \"pnpm panda:watch\" \"pnpm build:native --watch --preserveWatchOutput\" \"pnpm build:web --watch\" ",
"build:web": "tsup --config tsup.config.web.ts",
Expand Down
11 changes: 9 additions & 2 deletions packages/ui/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,18 @@
"lib": ["esnext", "DOM"],
"baseUrl": ".",
"rootDir": ".",
"outDir": "./dist-all",
"outDir": "./dist-web",
"paths": {
"leather-styles/*": ["leather-styles/*"]
}
},
"include": ["**/*", "src/.storybook-*/*", "**/*.*.stories.tsx", "global.d.ts", "leather-styles"],
"exclude": ["node_modules", "babel.config.cjs", "metro.config.cjs", "**/*.js", "./dist-*"]
"exclude": [
"node_modules",
"babel.config.cjs",
"metro.config.cjs",
"tsup.config.*.ts",
"**/*.js",
"./dist-*"
]
}
9 changes: 8 additions & 1 deletion packages/ui/tsconfig.native.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,12 @@
"**/*.shared.tsx",
"global.d.ts"
],
"exclude": ["node_modules", "babel.config.cjs", "metro.config.cjs", "**/*.js", "./dist-*"]
"exclude": [
"node_modules",
"babel.config.cjs",
"metro.config.cjs",
"tsup.config.*.ts",
"**/*.js",
"./dist-*"
]
}
18 changes: 16 additions & 2 deletions packages/ui/tsconfig.web.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,20 @@
"leather-styles/*": ["leather-styles/*"]
}
},
"include": ["**/*.web.ts", "**/*.web.tsx", "web.ts", "**/*.shared.tsx", "global.d.ts"],
"exclude": ["node_modules", "babel.config.cjs", "metro.config.cjs", "**/*.js", "./dist-*"]
"include": [
"**/*.web.ts",
"**/*.web.tsx",
"web.ts",
"**/*.shared.tsx",
"global.d.ts",
"leather-styles"
],
"exclude": [
"node_modules",
"babel.config.cjs",
"metro.config.cjs",
"tsup.config.*.ts",
"**/*.js",
"./dist-*"
]
}
10 changes: 1 addition & 9 deletions packages/ui/tsup.config.web.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,23 +16,15 @@ export default defineConfig({
from: ['./src/assets-web/**/*'],
to: ['./src/assets-web'],
},
{
from: ['./src/components/**/*'],
to: ['./src/components'],
},
{
from: ['./src/icons/**/*'],
to: ['./src/icons'],
},
],
copyOnStart: true,
watch: true,
}),
],
onSuccess: 'tsc --build tsconfig.json',
format: ['esm'],
tsconfig: 'tsconfig.web.json',
outDir: 'dist-web/',
dts: true,
clean: false,
minify: true,
minifyIdentifiers: true,
Expand Down
2 changes: 1 addition & 1 deletion turbo.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"$schema": "https://turbo.build/schema.json",
"tasks": {
"build": {
"outputs": ["dist/**"],
"outputs": ["dist/**", "dist-*/**"],
"dependsOn": ["^build"]
},
"build:watch": {},
Expand Down

0 comments on commit be283c5

Please sign in to comment.