gmlewis / flutter-stylizer

Flutter Stylizer is a VSCode extension that organizes your Flutter classes and mixins in an opinionated and consistent manner.
https://marketplace.visualstudio.com/items?itemName=gmlewis-vscode.flutter-stylizer
Apache License 2.0
23 stars 3 forks source link

extract to standalone library #13

Closed themightychris closed 3 years ago

themightychris commented 4 years ago

Thanks for this great work! I'd like to have a GitHub action apply these formatting policies automatically to every PR.

How difficult would it be to make a standalone tool that could be run from a command line to apply this formatting to arbitrary files on disk? The discussion in #6 seems to indicate it would be a big lift to get it working outside a vscode environment.

Has anyone looked into the options yet for working with Dart AST to/from disk?

gmlewis commented 4 years ago

Hmmm... that's a great question. I have not thought about a stand-alone version yet.

Honestly, if I were to write a stand-alone tool, I would write it in Go. :joy:

I'm a bit swamped with work at the moment, but I'll keep thinking about it. Maybe it wouldn't be too bad with Go. Thanks for the suggestion!

gmlewis commented 3 years ago

Hi @themightychris - I finally got some time to look into this, and wrote a Go stand-alone version of the flutter-stylizer that runs on Linux, Windows, and Mac.

It's available here: https://github.com/gmlewis/go-flutter-stylizer/

Please let me know if you have any problems with it. Closing issue as resolved.

themightychris commented 3 years ago

awesome, thanks @gmlewis !