Quantcast
Channel: JavaScriptMVC Forum
Viewing all articles
Browse latest Browse all 3491

steal config deps not working

$
0
0
I am using the steal which is part of JMVC 3.3. I have the following steal config

  1. steal.config({
  2.       map: {
  3.       "*": {
  4.                   "jquery/jquery.js" : "jquery",
  5.                   "can/util/util.js": "can/util/jquery/jquery.js",
  6.                   "jquery/": "jquerypp/"
  7.             }
  8.       },
  9.       
  10.       paths: {
  11.             "jquery/": "jquerypp/",
  12.             "jquery": "can/lib/jquery.1.9.1.js",
  13.             "mootools/mootools.js" : "can/lib/mootools-core-1.4.5.js",
  14.             "dojo/dojo.js" : "can/util/dojo/dojo-1.8.1.js",
  15.             "yui/yui.js" : "can/lib/yui-3.7.3.js",
  16.             "zepto/zepto.js" : "can/lib/zepto.1.0rc1.js",
  17.             "jquery-ui.js" : "vendor/jquery-ui.min.js"
  18.       },

  19.       shim : {
  20.             jquery: {
  21.                   exports: "jQuery"
  22.             },
  23.             "jquery-ui.js" : {
  24.                   deps: ["jquery"]
  25.             }
  26.       },
  27.       
  28.       ext: {
  29.             js: "js",
  30.             css: "css",
  31.             less: "steal/less/less.js",
  32.             coffee: "steal/coffee/coffee.js",
  33.             ejs: "can/view/ejs/ejs.js",
  34.             mustache: "can/view/mustache/mustache.js"
  35.       }
  36. });

The issue is when I use 'jquery-ui.js' as a dependency in any js file, it does not load 'jquery' automatically. Is that the behavior or am I missing something?

  1. steal('jquery-ui.js', function(){
  2.       // more code here
  3. });

This is the error I get: Uncaught ReferenceError: jQuery is not defined

Infact when I check the sources loaded intot he browser, I can see that 'can/lib/jquery1.9.1.js' file has been loaded.

Any help with this would be appreciated.

Thanks!

Viewing all articles
Browse latest Browse all 3491

Trending Articles