facebookarchive / flow-remove-types

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

script does not copy .css files when running against dirs #73

Open santospatrick opened 6 years ago

santospatrick commented 6 years ago

directory example:

├── src
|   └── components
|       └── MyComponent
|           ├── MyComponent.jsx   # with flow types
|           ├── MyComponent.css

After running the following command i get this:

flow-remove-types src/ --out-dir dest/
├── dest
|   └── components
|       └── MyComponent
|           ├── MyComponent.jsx   # without flow types
|           ├── # where is my .css file?
motiz88 commented 5 years ago

I suppose we could add a simple flag to copy all files, like Babel's CLI has. For front-end builds, though (which I'm guessing this is because of the .jsx and .css) I think you're better off using @babel/plugin-transform-flow-strip-types inside whatever build process you already have, which probably already includes Babel. This package isn't intended to replace Webpack or Gulp (etc).