thrift2flow
thrift2flow copied to clipboard
Allow passing a dir or a glob to the cli tool
Running thrift2flow ./idl/code.uber.internal/**/*.thrift works, but if I add it to package.json's scripts:
"idl-flow": "thrift2flow ./idl/code.uber.internal/**/*.thrift"
it stops working. I believe it's because my shell expands the glob expression while the scripts in package.json do not (see https://medium.com/@jakubsynowiec/you-should-always-quote-your-globs-in-npm-scripts-621887a2a784). It would be good to have an ability to pass either a folder or a glob to the CLI.
We can use something similar to what prettier, eslint and other CLI use, like https://github.com/mrmlnc/fast-glob or https://github.com/sindresorhus/globby