StaticCSSFile
The StaticCSSFile resource creates and manages static CSS files in your project using Alchemy’s File System capabilities.
Minimal Example
Section titled “Minimal Example”Creates a basic CSS file with styles:
import { StaticCSSFile } from "alchemy/fs";
const styles = await StaticCSSFile( "styles.css", ` .container { max-width: 1200px; margin: 0 auto; padding: 0 1rem; }`);
Custom Path
Section titled “Custom Path”Creates a CSS file at a specific path:
import { StaticCSSFile } from "alchemy/fs";
const styles = await StaticCSSFile( "main", "src/styles/main.css", `.button { background-color: #0062ff; color: white; border: none; padding: 0.5rem 1rem; border-radius: 4px; }`);