Created
June 1, 2012 16:06
-
-
Save danscotton/2853216 to your computer and use it in GitHub Desktop.
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
// device.config.js | |
define(['module/config/config'], function( config ) { | |
// some logic up somewhere | |
var device; | |
switch(true) { | |
case (screen.width > 1200): device = 'wide'; break; | |
case (screen.width > 640): device = 'tablet'; break; | |
... | |
} | |
config({ | |
device: device | |
}); | |
}); | |
// touch.config.js | |
define('module/config/config', function( config ) { | |
config({ | |
isTouch: // logic in here | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment