toloframework
Version:
Javascript/HTML/CSS compiler for Firefox OS or nodewebkit apps using modules in the nodejs style.
24 lines (17 loc) • 481 B
JavaScript
;
exports.generateCodeFrom = function( def, codeBehind, moduleName ) {
var global = {};
var attName, attValue;
for( attName in def ) {
if( attName == '0' ) continue;
attValue = def[attName];
global[attName] = parseAttributeValue( attValue );
}
return codeBehind + `
//--------------------------
// Module global variables.
var GLOBAL = ` + JSON.stringify( global, null, " " );
};
function parseAttributeValue( value ) {
return value;
}