Skip to main content

basecoat_css/
lib.rs

1//! Component-layer CSS for basecoat-rs.
2//!
3//! Drop into a Tailwind v4 pipeline via `@import` or write to disk and
4//! reference the file from your build.
5//!
6//! # Examples
7//!
8//! ```no_run
9//! use std::path::Path;
10//! basecoat_css::write_to(Path::new("style/basecoat.css")).unwrap();
11//! ```
12
13/// The full basecoat-css source as a `&'static str`.
14pub const SOURCE: &str = include_str!("../assets/basecoat.css");
15
16/// Write the source to `path`, overwriting if it exists.
17pub fn write_to(path: &std::path::Path) -> std::io::Result<()> {
18    std::fs::write(path, SOURCE)
19}