thrift2flow icon indicating copy to clipboard operation
thrift2flow copied to clipboard

Allow passing a dir or a glob to the cli tool

Open NameFILIP opened this issue 6 years ago • 1 comments

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.

NameFILIP avatar Feb 21 '19 00:02 NameFILIP

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

NameFILIP avatar Feb 21 '19 18:02 NameFILIP