UNPKG

481 BJavaScriptView Raw
1"use strict";
2
3
4exports.generateCodeFrom = function( def, codeBehind, moduleName ) {
5 var global = {};
6
7 var attName, attValue;
8 for( attName in def ) {
9 if( attName == '0' ) continue;
10 attValue = def[attName];
11 global[attName] = parseAttributeValue( attValue );
12 }
13
14 return codeBehind + `
15//--------------------------
16// Module global variables.
17var GLOBAL = ` + JSON.stringify( global, null, " " );
18};
19
20
21function parseAttributeValue( value ) {
22 return value;
23}