topical media & game development
mobile-query-three-plugins-requirejs-bin-tomainconfigfile.js / js
// declare a fake requirejs.config() function to merge all calls in a single options object
var output = {}
var requirejs = {};
requirejs.config = function(opts){
// merge opts in output with deep copy
deepExtend(output, opts)
// from http://andrewdupont.net/2009/08/28/deep-extending-objects-in-javascript/
function deepExtend(dst, src){
for (var property in src) {
if (src[property] && src[property].constructor && src[property].constructor === Object) {
dst[property] = dst[property] || {};
arguments.callee(dst[property], src[property]);
} else {
dst[property] = src[property];
}
}
return dst;
};
}
// get all filenames in confrequire/*.conrequire.js
var filenames = require('fs').readdirSync('confrequire').filter(function(filename){
return filename.match(/\.confrequire\.js
(C) Æliens
04/09/2009
You may not copy or print any of this material without explicit permission of the author or the publisher.
In case of other copyright issues, contact the author.