Commit 49a248c
authored
fix: build system improvements for package-level scripts (#263)
## **Description**
This PR improves the build system across the monorepo to properly handle
individual package build scripts and ensure consistent building
behavior.
Key improvements:
1. Updates root build script to use Yarn workspaces for better package
management
2. Ensures CSS files are properly built and placed in dist directories
3. Fixes issues with individual package builds using `yarn workspace`
4. Standardizes build scripts across packages
## **Related issues**
Fixes: #262
## **Manual testing steps**
1. Clean all builds: `yarn build:clean`
2. Run root build: `yarn build`
3. Run build types: `yarn build:types`
4. Verify CSS files are present in design-tokens/dist
5. Test individual package build: `yarn workspace
@metamask/design-tokens run build`
6. Verify all build artifacts are generated correctly
## **Screen recordings**
### Before
Preview build of design tokens doesn't work because stylesheet is not
included in build
<img width="1350" alt="Screenshot 2024-12-02 at 7 33 42 AM"
src="https://github.com/user-attachments/assets/63e5be37-1951-4ffc-9818-ad9db8dce6c7">
Styles not being built in design tokens and not all types being built
https://github.com/user-attachments/assets/238f1b2d-02dd-4d06-bdb5-3475bbd5cd62
### After
Preview build of design tokens works because stylesheet is included in
build
<img width="1386" alt="Screenshot 2024-12-02 at 7 35 05 AM"
src="https://github.com/user-attachments/assets/a9baa4a7-b9d8-4656-8aad-fd40f9d18087">
Build scripts working as expected and stylesheeet in design tokens
package being built
https://github.com/user-attachments/assets/236078ed-2584-437c-ac37-b957edcab8f6
## **Pre-merge author checklist**
- [x] I've followed MetaMask Contributor Docs
- [x] I've completed the PR template
- [x] I've included tests (build verification)
- [x] I've documented the build process
- [x] I've applied appropriate labels
## **Pre-merge reviewer checklist**
- [ ] I've manually tested the PR
- [ ] I confirm this PR addresses all acceptance criteria1 parent f518b80 commit 49a248c
File tree
10 files changed
+15
-20
lines changed- packages
- design-system-react-native
- design-system-react
- design-system-tailwind-preset
- design-system-twrnc-preset
- design-tokens
- scripts
10 files changed
+15
-20
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
17 | | - | |
| 16 | + | |
| 17 | + | |
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| |||
59 | 59 | | |
60 | 60 | | |
61 | 61 | | |
62 | | - | |
63 | 62 | | |
64 | 63 | | |
65 | 64 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
46 | | - | |
47 | 46 | | |
48 | 47 | | |
49 | 48 | | |
| |||
57 | 56 | | |
58 | 57 | | |
59 | 58 | | |
| 59 | + | |
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
13 | | - | |
14 | | - | |
| 12 | + | |
15 | 13 | | |
16 | 14 | | |
17 | 15 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
| 59 | + | |
59 | 60 | | |
60 | 61 | | |
61 | 62 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
| 50 | + | |
50 | 51 | | |
51 | 52 | | |
52 | 53 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
| 11 | + | |
12 | 12 | | |
13 | 13 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
36 | | - | |
37 | 36 | | |
38 | 37 | | |
39 | 38 | | |
40 | 39 | | |
41 | 40 | | |
42 | | - | |
43 | 41 | | |
44 | 42 | | |
45 | 43 | | |
| |||
52 | 50 | | |
53 | 51 | | |
54 | 52 | | |
| 53 | + | |
55 | 54 | | |
56 | 55 | | |
57 | 56 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | 11 | | |
19 | 12 | | |
20 | 13 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
| 4 | + | |
4 | 5 | | |
5 | | - | |
| 6 | + | |
| 7 | + | |
6 | 8 | | |
7 | 9 | | |
8 | 10 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3208 | 3208 | | |
3209 | 3209 | | |
3210 | 3210 | | |
| 3211 | + | |
3211 | 3212 | | |
3212 | 3213 | | |
3213 | 3214 | | |
| |||
3230 | 3231 | | |
3231 | 3232 | | |
3232 | 3233 | | |
| 3234 | + | |
3233 | 3235 | | |
3234 | 3236 | | |
3235 | 3237 | | |
| |||
3277 | 3279 | | |
3278 | 3280 | | |
3279 | 3281 | | |
| 3282 | + | |
3280 | 3283 | | |
3281 | 3284 | | |
3282 | 3285 | | |
| |||
3352 | 3355 | | |
3353 | 3356 | | |
3354 | 3357 | | |
3355 | | - | |
3356 | 3358 | | |
3357 | 3359 | | |
3358 | 3360 | | |
| |||
0 commit comments