jsx / JSX

JSX - a faster, safer, easier JavaScript
http://jsx.github.io/
MIT License
1.46k stars 102 forks source link

CLI --extension flag should check for valid extension #334

Closed johntrandall closed 9 years ago

johntrandall commented 9 years ago

Currently, jsx -watch --extension jsx /scr /build launches the JSX compiler CLI. However, it does not compile files with the .jsx extension as expected. The 'dot' is missing.

To make the CLI work correctly, the user needs to type (note the added 'dot') jsx -watch --extension .jsx /scr /build

This seems to be a common user mistake. it would be nice if the CLI was more forgiving with it, or threw a warning.

I think the user can be forgiven for the mistake. It is natural to expect that an 'extension' flag receives only an extension itself, rather than an extension with a preceding dot. The Semantics are tricky here.

johntrandall commented 9 years ago

nv. I'm an idiot.