volojs / create-template

The sample single page app project template, uses RequireJS
415 stars 363 forks source link

Extend main.js to use app dependencies #3

Closed jzaefferer closed 10 years ago

jzaefferer commented 10 years ago

I tried to replicate the setup suggested here. I've got stuck since my main.js, unlike the one provided here, as dependencies to other "app" modules. The path for those is wrong. It would be useful if this template could demonstrate that piece of the puzzle as well.

jrburke commented 10 years ago

I tried to indicate that app modules should be referenced via relative IDs, as in this comment, but it sounds like that is not enough, or you have a slightly different layout?

I am not sure if I follow where it breaks down in the example you mention, so more detail would help me understand.

jzaefferer commented 10 years ago

It would help me a lot if this file had dependencies: https://github.com/volojs/create-template/blob/master/www/app/main.js

Both to vendor and app modules.

jzaefferer commented 10 years ago

Looking at the commit, I suspect my mistake was to use a non-relative path for the app (non-vendor) dependency. Thanks for updating the example. Would be nice to have a reference to that in the requirejs docs.