facebookarchive / flow-remove-types

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

code removed types has many whitespace not removed #49

Closed xiaoping0x closed 7 years ago

xiaoping0x commented 7 years ago

babel is better solution.

babel --plugins transform-flow-strip-types src -d src-remove-flowtypes
TrySound commented 7 years ago

Whitespaces can be removed https://github.com/flowtype/flow-remove-types#pretty-transform Babel is very slow.

leebyron commented 7 years ago

The whitespace left behind is very much intentional - it allows this transform to be applied without need for source maps. Optionally, the white-space can be removed.