mix live_style (LiveStyle v0.13.1)
View SourceInvokes LiveStyle CSS generation with the given profile and args.
Usage
$ mix live_style PROFILE [ARGS]
Examples
# Generate CSS once
$ mix live_style default
# Watch mode for development
$ mix live_style default --watchProfile Configuration
The profile must be defined in your config files:
config :live_style,
default: [
output: "priv/static/assets/css/live.css",
cd: Path.expand("..", __DIR__)
]Arguments
--watch- Watch for changes and regenerate CSS automatically
Task Options
Options for the Mix task itself (must be given before the profile):
--runtime-config- Load the runtime configuration before executing
Example:
$ mix live_style --runtime-config default
Development Watcher
For development, it's typically easier to configure a watcher in your Phoenix endpoint instead of running this task manually:
# config/dev.exs
config :my_app, MyAppWeb.Endpoint,
watchers: [
live_style: {LiveStyle, :install_and_run, [:default, ~w(--watch)]}
]