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

hamlcoffee_amd.js not found. #104

Closed
krokhale opened this issue Jul 15, 2013 · 2 comments
Closed

hamlcoffee_amd.js not found. #104

krokhale opened this issue Jul 15, 2013 · 2 comments

Comments

@krokhale
Copy link

This is the stack i have:

  1. Rails 3.2
  2. Requirejs rails
  3. backbone
  4. coffeescript

Now i have been using haml_coffee_assets for a while now, maybe a slightly older version.
haml_coffee_assets (1.11.1, 1.11.0)

I use asset_sync, compiles great, i precompile and i have assets folder with files that have the ['hamlcoffee_amd'] injected. Great.

Now under the javscripts folder, until now i had just one backbone app, and everything still works great on that app.

javascripts/backbone

I just created two new apps under

javascripts/mobile
javascripts/setup

Pretty much a replica of the first backbone app structure, now when i pre compile, i still see hamlcoffee amd injected in assets folder for those new apps, but when in production i get hamlcoffee_amd.js not found.

Any ideas why?

Thanks for reading!

@krokhale
Copy link
Author

So i got it working, but i am still fuzzy on why it did not work, also, its not an optimal solution. In the requirejs.yml, while compiling the top level module (as in the first backbone app uses 'application'), but new backbone apps use different names.

  • name: 'setupApp'

    exclude: ['application', 'jquery', 'mobile']

When i comment out the exclude line, i.e, include application, it works, but it adds a whole bunch of js from application.js which i dont really need in setupApp, ideally i would want hamlc to get compiled without me having to include application.js, i.e so that i can uncomment out that exclude line.

Thanks!

@netzpirat
Copy link
Collaborator

So, back from holiday :( I'm sorry that this issue slipped under my radar, I usually try to give feedback on every issue, but I'm glad you made it work. I don't use RequireJS on any project and the code was contributed, but if you have any improvement, I'm glad to merge it.

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

No branches or pull requests

2 participants