Macil / flow-copy-source

Script to copy javascript files and append ".flow" to the filename
MIT License
173 stars 13 forks source link

option to rename `.jsx.flow` -> `.js.flow` #19

Open sodiumjoe opened 5 years ago

sodiumjoe commented 5 years ago

babel does this, and when I just run flow-copy-source, flow doesn't appear to be able to find the correct files until I rename all the .jsx.flow files to .js.flow.

sodiumjoe commented 5 years ago

in fact, i can't think of any reason why we'd want .jsx.flow files so maybe an option would be wrong, it should just always rename to .js.flow?

Macil commented 5 years ago

This sounds like a good feature. I'm fine with making it the default behavior, though I'm going to consider it a breaking change and bump the major version number.

Should any other extensions be changed to .js? (Like .mjs?) I'd like the default to be consistent with whatever the babel CLI tool does.

sodiumjoe commented 5 years ago

I'm not an .mjs user and I'm not sure what the story is for how people use .mjs. I expect for publishing libraries, people still rename to .js, though?

Always renaming to .js seems like a sane default. You could add a configuration option if people need it.