ts-proto icon indicating copy to clipboard operation
ts-proto copied to clipboard

feat: Provide configuration via file

Open atassis opened this issue 1 year ago • 2 comments

It would be nice to provide a configuration for a script from a file, instead command arguments, like eslint, webpack, etc do.

atassis avatar Aug 12 '24 14:08 atassis

Hi @atassis ; yep, agreed that would make sense. I think originally I anticipated that users would "only use one or two config flags", but I could see that, as things get more complicated, there could be more and more flags...

If you'd like to submit a PR that supports loading the config from a file, like a JSON file or what not, that'd be great!

Not sure if it's worth finding a library that "supports .tsproto.json or .tsproto.ts or .tsproto.yaml" or what not would be worth it, vs something simpler like just assuming the file is always json. Or even just newlines of like:

opt_a=foo
opt_b=bar

Dunno, wdyt?

stephenh avatar Aug 12 '24 15:08 stephenh

While I was thinking about this issue, I came to a thought that it is better to understand what is going on with options (this is why #1088 was created). I'll first make it obvious about what do options do, and then it'll be easier to see, which way is easier. Still, if to speculate a bit- it is better to use less packages if available, so it is better to accomplish this task with lesser amount (or 0) of new packages involved.

atassis avatar Aug 12 '24 16:08 atassis