Created
September 12, 2012 17:13
-
-
Save mockee/3708247 to your computer and use it in GitHub Desktop.
Using `define.js` with `Do.js`
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
// Using new `define.js` | |
// https://gist.github.com/3699759 | |
// Set namespace & module exports aliases | |
define.ns('Ark'); | |
define.config({ | |
'mods/cookie': 'Ark.cookie', | |
'mods/ajax': 'Ark.ajax' | |
}); | |
// Development | |
Do.add('cookie', { path: 'mods/cookie.js' }); | |
Do.add('ajax', { path: 'mods/ajax.js', requires: ['cookie'] }); | |
// Production | |
Do.add('ajax', { path: 'mods/ajax-with-cookie.js' }); | |
Do('ajax'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment