chriss...@gmail.com
unread,Jun 28, 2013, 9:01:49 AM6/28/13Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to ja...@googlegroups.com
Hello,
I just recently discovered jam.js and really like the whole concept. I come from the Rails world and the idea of having a tool like rubygems to manage dependencies between client-side javascript libraries is really attractive.
I've already been using requirejs for a while so I understand the basics, but I was confused to see that dependency management did not seem to work for shimmed libraries as I would have expected it to.
After installing jam via npm, I installed jquery, underscore and backbone. As expected, at this point when I inspected the require.config.js file I found the following shim:
"shim": {
"backbone": {
"deps": [
"underscore",
"jquery"
],
"exports": "Backbone"
},
"underscore": {
"exports": "_"
}
}
So far so good, but when I then install backbone-relational, and then bootstrap, I find that the shim section of the config remains unchanged -- despite the fact that backbone-relational is clearly dependent on backbone, and bootstrap is clearly dependent on jquery (as indicated in their respective package.json files).
What I'm wondering is: if jam is clearly aware of these dependencies, why is the shim section of require.js.config (and require.js) not being updated correctly when I install them? Is this not the expected behaviour, or am I misunderstanding something here?
Any help would be much appreciated, thanks!
Chris Salzberg