~fancycade/rebar3_tailwind

ref: 124657e7237dc69f6fb1041d917cb79df0233993 rebar3_tailwind/README.md -rw-r--r-- 926 bytes
124657e7Harley Swick Include note about post provider hook 11 months ago

#rebar3_tailwind

A rebar plugin

#Build

$ rebar3 compile

#Use

Follow the tailwind docs to setup tailwind for your project.

Add the plugin to your rebar config:

{plugins, [
    {rebar3_tailwind, {git, "https://host/user/rebar3_tailwind.git", {branch, "main"}}}
]}.

Set options:

{tailwind_opts, [{input, "./apps/hello_world/priv/input.css"},
                 {output, "./_build/default/lib/hello_world/priv/static/assets/output.css"}]}.

Set the compile provider hook:

{provider_hooks, [
                 {post, [{compile, {tailwind, compile}}]}
                 ]}.

It is recommended to set it as post, not pre. The logic being, we don't care what our website looks like if the erlang application can't even compile.

Then simply compile your project and your compiled css will be at the output path:

$ rebar3 compile