Skip to content

Feature: Make tailwind-class-sorter compatible with tailwindcss-rails #858

@michebble

Description

@michebble

I just upgraded to v8.0 and one feature I was looking forward to with the Tailwindcss class sorter.

Unfortunately, when adding the "tailwind-class-sorter" rewriter option to formatter section of the .herb.yml I am met with this warning:

Herb Rewriter: Failed to initialize pre-format rewriter "tailwind-class-sorter": Tailwind CSS is not installed in this project. To use the Tailwind class sorter, install Tailwind CSS itself using: npm install -D tailwindcss, or remove the "tailwind-class-sorter" rewriter from your .herb.yml config file. If "tailwindcss" is already part of your package.json, make sure your NPM dependencies are installed. Original error: ENOENT: no such file or directory, open '/root/.cursor-server/extensions/marcoroth.herb-lsp-0.8.0-universal/dist/css/preflight.css'.

The project includes Tailwindcss via the tailwindcss-rails gem (v3.3.1), and we do not have a JavaScript runtime(node, bun, etc) available as we use import maps instead.

Would it be possible to make this feature compatible with projects that include Tailwindcss via tailwindcss-rails?
Would upgrading the gem to v4+ help?

Thank you for your hard work and effort on this project.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions