-
Notifications
You must be signed in to change notification settings - Fork 146
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
Define template dependencies for inline partials (amd) #74
Comments
Oh yeah, I saw this issue coming :D This is currently not possible, but I'll add support for it in haml-coffee asap. Stay tuned! |
That would be great, thanks! Look forward to it. |
Trivial AMD dependency management is done netzpirat/haml-coffee@f614940 The Haml Coffee Assets integration comes as next... |
Wow thanks so much! |
Amazing, will try this out very soon. Thanks so much for getting this up and running so fast. |
Haml coffee assets is wonderful, I use it heavily and was happy to see the recent commit (e3287d3) and template adding support for amd/require.js. I've followed the steps and everything works fine, but when migrating my existing templates I stumbled on the issue of how to include inline partials, described in a stackoverflow answer using
JST
.So normally, this is how you would include one template (
test
) in another one:What I have done to make this work with amd is to switch the
JST
for arequire
call:This works as long as I make sure to include
'assets/templates/test'
as a dependency in whatever code I'm calling the template from. Ideally though (in keeping with the philosophy of amd) I'd like to define the dependency directly in the template itself, so I don't have to include it wherever the template is called from.Is this possible? I see that in the generated javascript there is a
define
function around the template code with no dependency array. That's where I'd like to add the dependencies, if possible.Thanks in advance!
The text was updated successfully, but these errors were encountered: