Last active
December 16, 2015 23:29
-
-
Save alejandroiglesias/5514179 to your computer and use it in GitHub Desktop.
First file is my RequireJS config.
Second, is the main require() call.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
name: 'components/almond/almond', | |
include: 'lib/emform', | |
out: 'dist/emform.js', | |
optimize: 'uglify2', | |
useStrict: true, | |
shim: { | |
'handlebars': { | |
exports: 'Handlebars' | |
} | |
}, | |
wrap: { | |
start: '(function (window, document, undefined) {', | |
end: '}(window, document));' | |
}, | |
paths: { | |
'bean': 'components/bean/bean', | |
'handlebars': 'components/handlebars.js/dist/handlebars.runtime', | |
'reqwest': 'components/reqwest/reqwest' | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require([ | |
'lib/config', | |
'handlebars', | |
'bean', | |
'reqwest' | |
], function (config, handlebars, bean, reqwest) { | |
'use strict'; | |
console.log(handlebars); // undefined | |
console.log(config, bean, reqwest); // OK | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment