95681d4e09480084a852dd11cf7895a3b3e830a2 — Harley Swick 9 months ago 124657e 1.0.0
1 files changed, 26 insertions(+), 15 deletions(-)

M README.md => README.md +26 -15
@@ 1,28 1,27 @@
# rebar3_tailwind

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

## Build

    $ rebar3 compile

## Use

Follow the tailwind [docs](https://tailwindcss.com/docs/installation) to setup tailwind for your project.
Follow the tailwind [docs](https://tailwindcss.com/docs/installation) to setup tailwind for your project. Specifically, you'll need to install the tailwindcss executable.

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

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

Set options:
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/hello_world/priv/input.css"},
                     {output, "./_build/default/lib/hello_world/priv/static/assets/output.css"}]}.
    {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:

@@ 35,3 34,15 @@ It is recommended to set it as post, not pre. The logic being, we don't care wha
Then simply compile your project and your compiled css will be at the output path:

    $ rebar3 compile

## Contributing

Send patches to:


If you are new to email based git workflows please refer to this [tutorial](https://git-send-email.io/).

## License

Apache v2