Using the /* @flow */ header directive to control selective file processing is quite awkward. For integration into existing toolchains it would be preferable to support the specification of directories and/or files as command line arguments in the traditional unix fashion, ie.:
flow check [OPTION]... [ROOT | file | pattern]...
flow check ./
flow check libs/ demo/
flow check src/*.js
There is an --all option that checks all files in a given directory. But use it with care!
This doesn't solve the problem. Which is, manually adding or removing a line /* @flow */ in a file as a way to select which files should be processed is very awkward and not compatible with how Unix command line utilities are supposed to work (ie. by specifying a list of files or directories on the command line). To integrate well with a scripted toolchain I should be able to do something like:
find ./ --name *foo*.js | xargs -n1 flow check --files
etc.
This needs to be reopened.
Please.
Most helpful comment
This needs to be reopened.