mix compile.live_style (LiveStyle v0.12.0)
View SourceMix compiler that generates CSS from LiveStyle definitions.
This compiler runs after the standard Elixir compiler and generates the CSS file from the manifest that was populated during compilation.
Installation
Add to your mix.exs:
def project do
[
compilers: Mix.compilers() ++ [:live_style],
# ...
]
endConfiguration
Configure in your config/config.exs:
config :live_style,
default: [
output: "priv/static/assets/css/live.css",
cd: Path.expand("..", __DIR__)
]What It Does
- Writes the generated CSS to the configured output path
- Reports statistics (vars, keyframes, rules)
Output
The compiler outputs a message like:
LiveStyle: 42 vars, 3 keyframes, 128 rules → priv/static/assets/css/live.cssRelated Tasks
mix live_style.gen.css- Force regenerate CSS with recompilationmix live_style default- Run with profile configuration