Skip to content

Instantly share code, notes, and snippets.

@danscotton
Created July 6, 2012 11:21
Show Gist options
  • Select an option

  • Save danscotton/3059627 to your computer and use it in GitHub Desktop.

Select an option

Save danscotton/3059627 to your computer and use it in GitHub Desktop.
// locator_news_responsive/webapp/static/js/module/main.js
define([
'vendor/ender/reqwest',
'locator/bootstrap', <---- 'locator' here...where does this path come from?
'locator/locatorView' <---- is this the curl path that _we_ define in _our_ base.spv?
], function(
reqwest,
bootstrap,
LocatorView
){
...
});
// our base.spv
var curl = {
paths: {
...
'locator': '../../../locator/news/responsive/<?= $config['locatorVersion'] ?>/js/module/'
}
};
This seems bad if that is the case, no? Our 'locator' path definition should be ours, and used by us solely?
If we decide that we want to change the path to 'locator-dan', it means that the dependencies defined in main.js will break too?
@danscotton
Copy link
Author

Their paths in main.js should be relative to the current file?

define([
    './bootstrap',
    './locatorView'
], function(
    ...

Their directory structure:

/js
    /module
        bootstrap.js
        main.js
        locatorView.js

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment