Support arrays in CLI arguments#1300
Conversation
|
Can we add objects too? It would be really nice to specify plugins as command-line options. (I have a crash debugger plugin that is only conditionally turned on when debugging.) |
|
How would you like to see this on the CLI? Current option I'm thinking of is But this could become more complex if we add more options to plugins Initially I thought JSON object as both It looks quite verbose but at least grants the ability to control these plugins via CLI Perhaps name only might be a solution Or maybe we need some other CLI options to include/exclude plugins so users don't have to deal with a potentially tricky CLI syntax TypeScript doesn't have any examples to pull from and the last time I needed to specify an object via CLI I just used JSON 🤔 |
I'd say probably just straight up json syntax, but I'd also be okay with doing this in a followup PR |
yes, this format is what i intuitively expect to work. |
|
Thanks all! I'll just clean up my PR a bit for review |
|
Ready for review @Perryvw! |
Closes #1267
Allows TSTL to receive arrays for its parameters via the CLI from a comma separated value
Let me know if there's some other edge cases I may be missing
Edit:
Also supporting arrays of objects parameters (only effects
luaPlugins) by parsing a JSON array instead of a comma separated string