facebookarchive / flow-remove-types

🚿 Removes Flow type annotations from JavaScript files with speed and simplicity.
MIT License
467 stars 52 forks source link

Add --copy-source option (.flow) #64

Closed clintwood closed 5 years ago

clintwood commented 6 years ago

This PR adds a -c, --copy-source options to Copy typed source with .flow extension to output which Only applies when --out-file or --out-dir options are used.

Using this option will copy src/file.ext to dest/file.ext.flow (where ext is any extension supported by flow-remove-types) anytime there is an output file.

STRML commented 6 years ago

This is very helpful and a nice way to author flow packages.

clintwood commented 6 years ago

@leebyron, any chance you could take a look at this PR?

motiz88 commented 5 years ago

While it's nice from a performance standpoint not to have to read the source files twice, I don't know that this is strictly necessary given that https://github.com/Macil/flow-copy-source exists, and the fact that we have plans to resurrect gen-flow-files as the official solution for generating .js.flow files.

clintwood commented 5 years ago

All good!