| 1 |
# makeover-build |
| 2 |
|
| 3 |
Build-script support for the make-family design system. |
| 4 |
|
| 5 |
Every consumer materialises the same generated files from a `build.rs`, and |
| 6 |
until now every consumer wrote that code itself. GoingsOn and Balanced Breakfast |
| 7 |
grew byte-identical copies of the theme materialiser during the makeover-geometry |
| 8 |
adoption, and the layout stylesheet would have been the third and fourth copies. |
| 9 |
This is that code, once. |
| 10 |
|
| 11 |
```rust |
| 12 |
// build.rs |
| 13 |
fn main() { |
| 14 |
makeover_build::tauri_frontend(env!("CARGO_MANIFEST_DIR"), &makeover_build::Emit::default()); |
| 15 |
tauri_build::build(); |
| 16 |
} |
| 17 |
``` |
| 18 |
|
| 19 |
That writes `themes/` beside the manifest and `frontend/css/layout.css` under |
| 20 |
it, which is where both Tauri apps already look. Consumers wanting different |
| 21 |
paths call `themes` and `layout_css` directly. |
| 22 |
|
| 23 |
## What is deliberately not here |
| 24 |
|
| 25 |
The geometry emitter. GoingsOn scopes the touch preset to a `ui-mode-mobile` |
| 26 |
class set by a bootstrap script, Balanced Breakfast hangs it off |
| 27 |
`@media (hover: none)`, and audiofiles has no switch at all. Extracting it would |
| 28 |
mean picking one of those policies by accident, inside a shared crate, without |
| 29 |
anyone deciding. Density selection is unowned and has its own task; the geometry |
| 30 |
half lands after it. |
| 31 |
|
| 32 |
Taking the identical half now and leaving the contested half alone is the point. |
| 33 |
A helper crate should record agreement, not manufacture it. |
| 34 |
|
| 35 |
## Why these files are generated |
| 36 |
|
| 37 |
Tauri's resource globs are read by its CLI against the crate directory, so they |
| 38 |
cannot point into a registry checkout or `OUT_DIR`. Materialising into the crate |
| 39 |
keeps the source crate authoritative without vendoring a second copy that |
| 40 |
drifts. Every path written here is expected to be gitignored. |
| 41 |
|
| 42 |
`themes` clears stale `.toml` files before writing, so a theme removed or |
| 43 |
renamed upstream does not linger in the bundle from an earlier build. That is |
| 44 |
the detail that makes this worth sharing rather than retyping: it is easy to |
| 45 |
omit, and its absence shows up as a theme that will not go away. |
| 46 |
|
| 47 |
## Status |
| 48 |
|
| 49 |
Unpublished, path deps on `makeover` and `makeover-webview`. Consumers are |
| 50 |
GoingsOn and Balanced Breakfast. |
| 51 |
|
| 52 |
## Licence |
| 53 |
|
| 54 |
MIT. |
| 55 |
|