-
Notifications
You must be signed in to change notification settings - Fork 21
Open
Labels
Description
Right now thrift2flow creates a directory and outputs the file there. This makes scripting a bit harder since you can't take the contents of the output and perform operations on it. Some examples:
- What if I want to output it to a different location? Right now I have to run thrift2flow, copy the file and then delete the folder created by the tool.
- Testing currently depends on the file system since it's actually outputting files as the tests run.
Instead I suggest when you run
thrift2flow something.thrift
That the contents of the generated file gets outputted to the console and when you run
thrift2flow something.thrift --o[[ut]put] ../something.types.js
The output will be written to the file path provided
An extension of this would be the ability to pass globby style strings and output globby style outputs. For example
// Filesystem
./thrifts/group1/subgroup1/product1.thrift
./thrifts/group1/subgroup2/product1.thrift
./thrifts/group1/subgroup2/product2.thrift
// CLI
thrift2flow ./thrifts/**/*.thrift --o[[ut]put] ./types/**/*.types.js
But this could be handled as a separate issue