ref: 95681d4e09480084a852dd11cf7895a3b3e830a2 rebar3_tailwind/README.md -rw-r--r-- 1.4 KiB
95681d4eHarley Swick Update README 9 months ago


A rebar plugin to trigger tailwind css compilation with rebar compile.


$ rebar3 compile


Follow the tailwind docs to setup tailwind for your project. Specifically, you'll need to install the tailwindcss executable.

Add the plugin to your project's rebar.config:

{plugins, [rebar3_tailwind]}.

Also set the tailwind options to figure out what the input and output paths should be. This is currently limited to a single input path. Patches are welcome to expand this. :

{tailwind_opts, [{input, "./apps/my_project/priv/input.css"},
		     {output, "./apps/my_project/priv/static/assets/output.css"}]}.

In this example I am putting my required input.css file in the priv directory of my application. Most likely, this is what you want to do as well.

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


Send patches to:


If you are new to email based git workflows please refer to this tutorial.


Apache v2