I am using the steal which is part of JMVC 3.3. I have the following
steal config
- steal.config({
- map: {
- "*": {
- "jquery/jquery.js" : "jquery",
- "can/util/util.js": "can/util/jquery/jquery.js",
- "jquery/": "jquerypp/"
- }
- },
- paths: {
- "jquery/": "jquerypp/",
- "jquery": "can/lib/jquery.1.9.1.js",
- "mootools/mootools.js" : "can/lib/mootools-core-1.4.5.js",
- "dojo/dojo.js" : "can/util/dojo/dojo-1.8.1.js",
- "yui/yui.js" : "can/lib/yui-3.7.3.js",
- "zepto/zepto.js" : "can/lib/zepto.1.0rc1.js",
- "jquery-ui.js" : "vendor/jquery-ui.min.js"
- },
-
- shim : {
- jquery: {
- exports: "jQuery"
- },
- "jquery-ui.js" : {
- deps: ["jquery"]
- }
- },
- ext: {
- js: "js",
- css: "css",
- less: "steal/less/less.js",
- coffee: "steal/coffee/coffee.js",
- ejs: "can/view/ejs/ejs.js",
- mustache: "can/view/mustache/mustache.js"
- }
- });
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?
- steal('jquery-ui.js', function(){
- // more code here
- });
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!