Shopify / packwerk

Good things come in small packages.
MIT License
1.59k stars 110 forks source link

[Feature Request] Haml support #373

Open richardmarbach opened 12 months ago

richardmarbach commented 12 months ago

We have a codebase that uses Haml as the templating engine. It would be great if packwerk could analyse Haml files as well.

Is Haml support interesting for the project? If there's interest, I'd be willing to contribute the feature.

gmcgibbon commented 12 months ago

Haml support makes sense to me, but it seems like it might make sense as a separate extension gem. You'll have to make a new parser, and likely improve the API for doing this in the parser factory.

alexevanczuk commented 12 months ago

There's a related PR to improve the API for extending parsers here: https://github.com/Shopify/packwerk/pull/243

richardmarbach commented 11 months ago

I've prepared haml support as an extension: https://github.com/richardmarbach/packwerk-haml

It currently depends on the PR branch: https://github.com/Shopify/packwerk/pull/375. Once the parser interface is finalised, I can adjust the haml parser to match it :)