Skip to content

Instantly share code, notes, and snippets.

@xiaojue
Created October 14, 2013 13:18
Show Gist options
  • Save xiaojue/6975448 to your computer and use it in GitHub Desktop.
Save xiaojue/6975448 to your computer and use it in GitHub Desktop.
debuging
(function(global,undef){
var isBrowser = !! (typeof window !== undef && global.navigator && global.document);
var debug = isBrowser ? (/debug/).test(location.search) : null;
var mod = {
alias:{},
basepath: debug ? 'path/src/' : 'path/dist'
};
if (global.define && isBrowser) {
define('config',function(){
return mod;
});
}else{
module.exports = mod;
}
})(this);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment