kimroen / ember-cli-coffeescript

Adds precompilation of CoffeeScript files and all the basic generation types to the ember generate command.
MIT License
72 stars 49 forks source link

Fix filtering to use coffeescript extensions #64

Closed davewasmer closed 9 years ago

davewasmer commented 9 years ago

I might be totally off base here, so feel free to let me know.

It seems that this extension should be the source extension, not the target extension. It is ultimately used by extensionsForType inside ember-cli to build a regex pattern of files to search for, and when it's set to js, the regex completely misses the Coffeescript source files, and the files are never preprocessed / included in the build output.

This extensionsForType codepath doesn't seem to execute for the /app folder, but does on the addon folder. This previously didn't matter, since pre 0.2.0-beta.1, nested addon preprocessors weren't supported. But now that they are, it seems this is required.

I'm still wrapping my head around the nested addon stuff, so let me know if I missed something obvious on this one.

kimroen commented 9 years ago

Hi! This seems reasonable, and thanks for catching it. I'll have to test it a little bit to make sure, but I'll get it merged and released with other improvements scheduled for the release of ember-cli 0.2 in hopefully not too long.

davewasmer commented 9 years ago

ping @rwjblue at his request