lib/startApplication.js
function loadTemplates(appName) {

    let appConfig = AmorphicContext.applicationConfig[appName] || {};
    let applicationSource = AmorphicContext.applicationSource;
    let applicationSourceMap = AmorphicContext.applicationSourceMap;
    let controllerPath = (appConfig.appConfig.controller || 'controller.js');
    let matches = controllerPath.match(/(.*?)([0-9A-Za-z_]*)\.js$/);
    let prop = matches[2];
    let baseTemplate = buildBaseTemplate(appConfig);

    applicationSource[appName] = '';
    applicationSourceMap[appName] = '';

    // Inject into it any db or persist attributes needed for application
    if (appConfig.initObjectTemplate && typeof appConfig.initObjectTemplate === 'function') {
        appConfig.initObjectTemplate(baseTemplate);
    }

    return [
        baseTemplate,
        getTemplates(baseTemplate, appConfig.appPath, [prop + '.js'], appConfig, appName)
    ];
}
function loadTemplates(appName) {

    let appConfig = AmorphicContext.applicationConfig[appName] || {};
    let applicationSource = AmorphicContext.applicationSource;
    let applicationSourceMap = AmorphicContext.applicationSourceMap;
    let controllerPath = (appConfig.appConfig.controller || 'controller.js');
    let matches = controllerPath.match(/(.*?)([0-9A-Za-z_]*)\.js$/);
    let prop = matches[2];
    let baseTemplate = buildBaseTemplate(appConfig);

    applicationSource[appName] = '';
    applicationSourceMap[appName] = '';

    // Inject into it any db or persist attributes needed for application
    if (appConfig.initObjectTemplate && typeof appConfig.initObjectTemplate === 'function') {
        appConfig.initObjectTemplate(baseTemplate);
    }

    return [
        baseTemplate,
        getTemplates(baseTemplate, appConfig.appPath, [prop + '.js'], appConfig, appName)
    ];
}
function loadTemplates ( appName ) { let appConfig = AmorphicContext . applicationConfig [ appName ] || { } ; let applicationSource = AmorphicContext . applicationSource ; let applicationSourceMap = AmorphicContext . applicationSourceMap ; let controllerPath = ( appConfig . appConfig . controller || 'controller.js' ) ; let matches = controllerPath . match ( / (.*?)([0-9A-Za-z_]*)\.js$ / ) ; let prop = matches [ 2 ] ; let baseTemplate = buildBaseTemplate ( appConfig ) ; applicationSource [ appName ] = '' ; applicationSourceMap [ appName ] = '' ; // Inject into it any db or persist attributes needed for application if ( appConfig . initObjectTemplate && typeof appConfig . initObjectTemplate === 'function' ) { appConfig . initObjectTemplate ( baseTemplate ) ; } return [ baseTemplate , getTemplates ( baseTemplate , appConfig . appPath , [ prop + '.js' ] , appConfig , appName ) ] ; }
Loads templates for an app at start up time.

@param {String} appName - The app name.

@returns {[Object, Object]} unknown
Loads templates for an app at start up time .