Sorts tailwind classes within elixir projects
TailwindFormatter is a mix format plugin designed to sort TailwindCSS classes used in HEEx templates and ~H sigils. This tool, inspired by Tailwind’s official Prettier plugin, enhances code organization by following a set of rules while formatting TailwindCSS classes. The formatter requires Elixir v1.15 or later to function properly.
mix format.To install TailwindFormatter, follow these steps:
tailwind_formatter to the list of dependencies in mix.exs..formatter.exs file to include TailwindFormatter configuration.mix tailwind default and mix compile to enable TailwindFormatter for organizing custom classes.mix format for automatic sorting of TailwindCSS classes.TailwindFormatter is an efficient tool that simplifies and enhances the formatting of TailwindCSS classes in Elixir projects. By following a set of rules inspired by the original Tailwind Prettier plugin, this formatter improves code organization and readability. Its compatibility with Elixir v1.15 or later and support for custom configurations make it a valuable asset for developers working with TailwindCSS in their projects.