lib/transformers/ng.uipart.transformer.js
function parseNames(filePath, prefix, defaultAppName) {
    var appName = this.getAppName(filePath, defaultAppName);
    var names = {
        appShortName: appName,
        appName:    this.getAppModuleName(prefix, appName),
        isPartial:  !!filePath.match(/^.*\.partial\.js/)
    };
    names.isPage = !names.isPartial;

    // name of the page used for setting the css style (ex. my.home.page.js would be my.home)
    // the class name on the maincontent in HTML would be something like gh-my-home
    var lastSlash = filePath.lastIndexOf(delim);
    names.uiPartName = filePath.substring(lastSlash + 1)
        .replace('.page.js', '')
        .replace('.partial.js', '');

    // view url is what is used as unique key in template cache for generated HTML
    names.viewUrl = 'templates/' + names.uiPartName;

    // get the directive and controller name (ex. directive ghAnswerList and controller AnswerListCtrl
    var moduleNamePascal = this.pancakes.utils.getPascalCase(filePath)
        .replace('Page', '')
        .replace('Partial', '');
    names.directiveName = prefix + moduleNamePascal;
    names.controllerName = moduleNamePascal + 'Ctrl';

    return names;
}
function parseNames(filePath, prefix, defaultAppName) {
    var appName = this.getAppName(filePath, defaultAppName);
    var names = {
        appShortName: appName,
        appName:    this.getAppModuleName(prefix, appName),
        isPartial:  !!filePath.match(/^.*\.partial\.js/)
    };
    names.isPage = !names.isPartial;

    // name of the page used for setting the css style (ex. my.home.page.js would be my.home)
    // the class name on the maincontent in HTML would be something like gh-my-home
    var lastSlash = filePath.lastIndexOf(delim);
    names.uiPartName = filePath.substring(lastSlash + 1)
        .replace('.page.js', '')
        .replace('.partial.js', '');

    // view url is what is used as unique key in template cache for generated HTML
    names.viewUrl = 'templates/' + names.uiPartName;

    // get the directive and controller name (ex. directive ghAnswerList and controller AnswerListCtrl
    var moduleNamePascal = this.pancakes.utils.getPascalCase(filePath)
        .replace('Page', '')
        .replace('Partial', '');
    names.directiveName = prefix + moduleNamePascal;
    names.controllerName = moduleNamePascal + 'Ctrl';

    return names;
}
function parseNames ( filePath , prefix , defaultAppName ) { var appName = this . getAppName ( filePath , defaultAppName ) ; var names = { appShortName : appName , appName : this . getAppModuleName ( prefix , appName ) , isPartial : ! ! filePath . match ( / ^.*\.partial\.js / ) } ; names . isPage = ! names . isPartial ; // name of the page used for setting the css style (ex. my.home.page.js would be my.home) // the class name on the maincontent in HTML would be something like gh-my-home var lastSlash = filePath . lastIndexOf ( delim ) ; names . uiPartName = filePath . substring ( lastSlash + 1 ) . replace ( '.page.js' , '' ) . replace ( '.partial.js' , '' ) ; // view url is what is used as unique key in template cache for generated HTML names . viewUrl = 'templates/' + names . uiPartName ; // get the directive and controller name (ex. directive ghAnswerList and controller AnswerListCtrl var moduleNamePascal = this . pancakes . utils . getPascalCase ( filePath ) . replace ( 'Page' , '' ) . replace ( 'Partial' , '' ) ; names . directiveName = prefix + moduleNamePascal ; names . controllerName = moduleNamePascal + 'Ctrl' ; return names ; }
Using the file path, parse out all the names needed for the UI part template
@param filePath
@param prefix
@param defaultAppName
Using the file path parse out all the names needed for the UI part template