- steal.config({
- amd : true,
- map: {
- "*": {
- "jquery/jquery.js" : "jquery",
- "can/util/util.js": "can/util/jquery/jquery.js"
- }
- },
- paths: {
- 'jquery' : 'can/lib/jquery.1.8.3.js',
- 'pidcrypt' : 'smsc/resources/pidCrypt/pidcript.js',
- },
- shim : {
- jquery: { exports: "jQuery"
- },
- pidcrypt : {
- exports: "pidCrypt"
- }
- },
- ext: {
- js: "js",
- css: "css",
- less: "steal/less/less.js",
- ejs: "can/view/ejs/ejs.js"
- }
- });
Now I'm gonna steal pidcrypt in a file like this:
- steal(
- 'jquery',
- 'can/model', 'pidcrypt',
- function($, Model, pidCrypt) {
- console.log(pidCrypt);
- });
This returns in console:
Isn't this the way shims should work?