lib/compiler-js.js
function processAttributeVar( project, depJSON, watch, depAbsPath ) {
    if ( typeof depJSON.var === 'undefined' ) return '';

    let
    head = 'const GLOBAL = {',
    firstItem = true;

    Object.keys( depJSON.var ).forEach( function forEachVarName( varName ) {
        const
        varFilename = depJSON.var[ varName ],
        folder = Path.dirname( depAbsPath ),
        srcVar = project.srcOrLibPath( Path.join( folder, varFilename ) ) ||
            project.srcOrLibPath( `mod/${varFilename}` ) ||
            project.srcOrLibPath( varFilename );

        if ( !srcVar ) {
            Fatal.fire(
                `Unable to find dendency file "${varFilename}" nor "mod/${varFilename}"!`,
                depAbsPath
            );
        }
        Util.pushUnique( watch, srcVar );
        if ( firstItem ) {
            firstItem = false;
        } else {
            head += ',';
        }
        const source = new Source( project, srcVar );
        head += `\n  ${JSON.stringify(varName)}: ${JSON.stringify(source.read())}`;
    } );
    head += "};\n";

    return head;
}
function processAttributeVar( project, depJSON, watch, depAbsPath ) {
    if ( typeof depJSON.var === 'undefined' ) return '';

    let
    head = 'const GLOBAL = {',
    firstItem = true;

    Object.keys( depJSON.var ).forEach( function forEachVarName( varName ) {
        const
        varFilename = depJSON.var[ varName ],
        folder = Path.dirname( depAbsPath ),
        srcVar = project.srcOrLibPath( Path.join( folder, varFilename ) ) ||
            project.srcOrLibPath( `mod/${varFilename}` ) ||
            project.srcOrLibPath( varFilename );

        if ( !srcVar ) {
            Fatal.fire(
                `Unable to find dendency file "${varFilename}" nor "mod/${varFilename}"!`,
                depAbsPath
            );
        }
        Util.pushUnique( watch, srcVar );
        if ( firstItem ) {
            firstItem = false;
        } else {
            head += ',';
        }
        const source = new Source( project, srcVar );
        head += `\n  ${JSON.stringify(varName)}: ${JSON.stringify(source.read())}`;
    } );
    head += "};\n";

    return head;
}
function processAttributeVar ( project , depJSON , watch , depAbsPath ) { if ( typeof depJSON . var === 'undefined' ) return '' ; let head = 'const GLOBAL = {' , firstItem = true ; Object . keys ( depJSON . var ) . forEach ( function forEachVarName ( varName ) { const varFilename = depJSON . var [ varName ] , folder = Path . dirname ( depAbsPath ) , srcVar = project . srcOrLibPath ( Path . join ( folder , varFilename ) ) || project . srcOrLibPath ( ` ${ varFilename } ` ) || project . srcOrLibPath ( varFilename ) ; if ( ! srcVar ) { Fatal . fire ( ` ${ varFilename } ${ varFilename } ` , depAbsPath ) ; } Util . pushUnique ( watch , srcVar ) ; if ( firstItem ) { firstItem = false ; } else { head += ',' ; } const source = new Source ( project , srcVar ) ; head += ` \n ${ JSON . stringify ( varName ) } ${ JSON . stringify ( source . read ( ) ) } ` ; } ) ; head += "};\n" ; return head ; }
In the DEP file, we can find the attribute "var".
It will load text file contents into the GLOBAL variable of the module.
@param {Project} project - Current project.
@param {objetc} depJSON - Parsing of the JSON DEP file.
@param {array} watch - Array of files to watch for rebuild.
@param {string} depAbsPath - Absolute path of the DEP file.
@returns {string} Javascript defining the const variable GLOBAL.
In the DEP file we can find the attribute var . It will load text file contents into the GLOBAL variable of the module .