mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[ADF-3323] Updated doc tools to use DocFX intermediate files (#3601)
* [ADF-3323] Moved source file parsing to main doc tool * [ADF-3323] Moved source info classes * [ADF-3323] Added doc YAML generator tool * [ADF-3323] Added doc YAML/JSON source paths to gitignore * [ADF-3323] Completed templates and template context code * [ADF-3323] Added source paths and updated type linker * [ADF-3323] Final fixes to templates and type linking * [ADF-3323] Fixed filter for private and protected methods * [ADF-3323] Content services docs after check and rebuild * [ADF-3323] Updated docbuild script in package.json
This commit is contained in:
committed by
Eugenio Romano
parent
54380fd693
commit
69d8ff147e
@@ -1,5 +1,6 @@
|
||||
module.exports = {
|
||||
"ngNameToDisplayName": ngNameToDisplayName,
|
||||
"ngNameToClassName": ngNameToClassName,
|
||||
"dekebabifyName": dekebabifyName,
|
||||
"kebabifyClassName": kebabifyClassName,
|
||||
"classTypes": ["component", "directive", "model", "pipe", "service", "widget"]
|
||||
@@ -13,6 +14,37 @@ function ngNameToDisplayName(ngName) {
|
||||
}
|
||||
|
||||
|
||||
function initialCap(str) {
|
||||
return str[0].toUpperCase() + str.substr(1);
|
||||
}
|
||||
|
||||
|
||||
function ngNameToClassName(rawName, nameExceptions) {
|
||||
if (nameExceptions[rawName])
|
||||
return nameExceptions[rawName];
|
||||
|
||||
var name = rawName.replace(/\]|\(|\)/g, '');
|
||||
|
||||
var fileNameSections = name.split('.');
|
||||
var compNameSections = fileNameSections[0].split('-');
|
||||
|
||||
var outCompName = '';
|
||||
|
||||
for (var i = 0; i < compNameSections.length; i++) {
|
||||
outCompName = outCompName + initialCap(compNameSections[i]);
|
||||
}
|
||||
|
||||
var itemTypeIndicator = '';
|
||||
|
||||
if (fileNameSections.length > 1) {
|
||||
itemTypeIndicator = initialCap(fileNameSections[1]);
|
||||
}
|
||||
|
||||
var finalName = outCompName + itemTypeIndicator;
|
||||
|
||||
return finalName;
|
||||
}
|
||||
|
||||
function displayNameToNgName(name) {
|
||||
var noSpaceName = ngName.replace(/ ([a-zA-Z])/, "$1".toUpperCase());
|
||||
return noSpaceName.substr(0, 1).toUpperCase() + noSpaceName.substr(1);
|
||||
|
Reference in New Issue
Block a user