Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support ember and backbone simultaneously #74

Conversation

rbhitchcock
Copy link
Contributor

This changeset fixes #58.

I tried to base changes on comments already in the issue. If the config option is true for multiple frameworks and ember, the code now checks for a .ember extension on files in order to compile them for ember; otherwise, it compiles them to the default JavaScript. I pulled most of the compile code into a function so that the additional logic checks still looked clean. Hopefully the config option name is sensible. I couldn't think of anything better. I also ensured that files like file.ember.hamlbars will still be compiled in this scenario as well.

I added a test and all existing tests are still passing.

@leshill
Copy link
Owner

leshill commented Jun 28, 2013

Hi @rbhitchcock,

Merged.

Thanks!

@leshill leshill closed this Jun 28, 2013
@Darep
Copy link
Contributor

Darep commented Jun 29, 2013

❤️ Thank you @rbhitchcock! I wanted something like this just yesterday morning, and here it is.

PS. I was actually planning to implement this myself, too, but you beat me to it :) I was planning to use a Config.ember_paths list, but .ember extension works just fine, too. Again, thank you very much!

@Darep
Copy link
Contributor

Darep commented Jun 29, 2013

Hmm. Unfortunately, it seemed to work ok when I tested it quickly, but now that I'm actually using it in our Rails project, it doesn't actually work.

I'm not using haml or slim, so the files had to have a .hbs.ember extension to get this to work, but the URLs to templates created by Rails in dev environment had a .ember.js extension. So Rails returned a 404, because it generated a funky path.

I think @rbhitchcock meant this to work with a simple some-template.ember, but .ember is not registered for the engine, so HandlebarsAssets doesn't pick it up.

I've made a quick fix and will create a pull request shortly 🐹

Edit: Said pull request: #78

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

handlebars_assets with backbone AND ember...
3 participants