1 | ;
|
2 |
|
3 |
|
4 | exports.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.
|
17 | var GLOBAL = ` + JSON.stringify( global, null, " " );
|
18 | };
|
19 |
|
20 |
|
21 | function parseAttributeValue( value ) {
|
22 | return value;
|
23 | }
|