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

Stealing Can with MooTools

$
0
0
Hi,
We deployed our product using CanJS 1.1.8 and Steal.
We never properly set things up with steal and launched it in production mode (building never worked).

Now that the bug torrent has settled down, I've gone back to trying to get steal working properly. For starters, getting stealconfig.js to do the right thing. My biggest issue is with mootools. 

Currently, we loaded all the external dependencies in our index.html file and only used steal for our application. This "works" but does not build. No stealconfig.

steal.config({
    map: {
        "*": {
            "can/util/util.js": "can/util/mootools/mootools.js"
        }
    },
    paths: {
        "mootools/mootools.js" : "/mootools-core-1.4.5-full-nocompat-tucows.js",
        "mootoolsMore/mootoolsMore.js" : "/mootools-more-1.4.0.1-tucows.js",
        "mootools-datepicker/mootools-datepicker.js" : "/arian-mootools-datepicker-2.2.0-0/Source/Picker.js",
    },
    shim : {
        "mootools": {
            exports: "MooTools"
        },
        "mootoolsMore": {
            deps: "mootools",
            exports: ["Class", "Hash"]
        },
        "mootools-datepicker": {
            deps: [
                    "mootools",
                    "/arian-mootools-datepicker-2.2.0-0/Source/Picker.Attach.js",
                    "/arian-mootools-datepicker-2.2.0-0/Source/Picker.Date.js",
                    "/arian-mootools-datepicker-2.2.0-0/Source/Picker.Date.Range.js"
                ]
        }
    },
    ext: {
        js: "js",
        css: "css",
        less: "steal/less/less.js",
        ejs: "can/view/ejs/ejs.js",
        mustache: "can/view/mustache/mustache.js"
    }
})

Running in dev mode:
Routing no longer works. I haven't had a chance to look into this yet, but it may be the version of Can that comes with JSMVC is older than the one that fixes all the MooTools routing issues I found last year.
Including mootoolsMore produces a bunch of 404s to single letter js files 
ie. s/s.js t/t.s etc.

When trying to build, the compiler dies on the fact that none of the classes that mootools creates exist. ie. Class and Hash.

Can someone help me out with how to construct this config properly for MooTools More?

Viewing all articles
Browse latest Browse all 3491

Trending Articles