UnrefinedBrain / vue-metamorph

Codemod Framework for Vue projects
https://vue-metamorph.dev/
MIT License
73 stars 1 forks source link

Add support for stylus #56

Closed adrienWeiss closed 2 months ago

adrienWeiss commented 3 months ago

Hello 👋

Since you've added CSS support to vue-metamorph I cannot parse my codebase anymore, due to it using <style lang="stylus"> I wouldn't mind that much if it just ignored those but it raises a parsing error. I figured I'd give it a try and the tests seem to work. Not sure how it would behave when parsing .styl files though, I get an error when trying to build (even master) 🤷‍♂️

Also, it looks like astexplorer does not parse stylus (at least the syntax I've added in the tests). If this PR doesn't work as expected or if you don't want to bother with stylus (which I would understand), can I ask what would be needed to at least ignore style tags with unknown language ?

cheers, and thanks again for this tool, I'm looking forward to using vue-upgrade-tools 👍

UnrefinedBrain commented 3 months ago

I wouldn't mind that much if it just ignored those but it raises a parsing error.

Good point. This shouldn't be hard. I'll fix that and then look at this. Thanks for the PR!

UnrefinedBrain commented 2 months ago

Released in v3.1.5

Let me know if it works for you - I'm not as familiar with stylus

adrienWeiss commented 2 months ago

awesome, I have yet to find a use case for parsing my style blocks but at least now this does not error anymore 👍