[ADF-3538] Alfresco Process Service Cloud - new package with CLI (#3872)

* [ADF-3538] start creating new folder for cloud components

* [ADF-3538] added new package to the script and the builds

* [ADF-3538] added some more changes to scripts

* [ADF-3538] - starting the new package

* change index

* fix package

* Fix module structure with Cli

* add basic structure

* Create a library with angular cli

* Add a cloud component as example

* Skip the scss style

* add the import scss

* remove useless codes

* Add i18n example

* remove useless code

* Simplify the hello component
Fix the wrong path

* Fix process service cloud path

* Download process-service-cloud from the CS
This commit is contained in:
Maurizio Vitale
2018-10-16 18:15:11 +01:00
committed by Eugenio Romano
parent 5378df9425
commit 0ecb6c13ec
57 changed files with 1540 additions and 1010 deletions

View File

@@ -24,7 +24,7 @@ var configFileName = "doctool.config.json";
var defaultFolder = path.resolve("docs");
var sourceInfoFolder = path.resolve("docs", "sourceinfo");
var libFolders = ["core", "content-services", "process-services", "insights"];
var libFolders = ["core", "content-services", "process-services", "insights", "process-services-cloud"];
var excludePatterns = [
"**/*.spec.ts"
@@ -41,7 +41,7 @@ function updatePhase(mdCache, aggData) {
});
var filenames = Object.keys(mdCache);
for (var i = 0; i < filenames.length; i++) {
var pathname = filenames[i];
@@ -164,8 +164,8 @@ function initSourceInfo(aggData, mdCache) {
let sources = app.expandInputFiles(libFolders.map(folder => {
return path.resolve("lib", folder);
}));
}));
aggData.projData = app.convert(sources);
@@ -188,7 +188,7 @@ function initSourceInfo(aggData, mdCache) {
}
/*
if (classRef) {
aggData.classInfo[className] = new si.ComponentInfo(classRef);
aggData.classInfo[className] = new si.ComponentInfo(classRef);
}
*/
@@ -204,7 +204,7 @@ function initClassInfo(aggData) {
yamlFilenames.forEach(yamlFilename => {
var classYamlText = fs.readFileSync(path.resolve(sourceInfoFolder, yamlFilename), "utf8");
var classYaml = jsyaml.safeLoad(classYamlText);
if (program.verbose) {
console.log(classYaml.items[0].name);
}
@@ -264,7 +264,7 @@ if (sourceInfo.isDirectory()) {
files = [ sourcePath ];
}
files = files.filter(filename =>
files = files.filter(filename =>
(filename !== undefined) &&
(path.extname(filename) === ".md") &&
(filename !== "README.md")
@@ -295,4 +295,4 @@ updatePhase(mdCache, aggData);
if (program.timing) {
var endTime = process.hrtime(startTime);
console.log(`Run complete in ${endTime[0]} sec`);
}
}

View File

@@ -20,7 +20,7 @@ var angFilePattern = /(component)|(directive)|(model)|(pipe)|(service)|(widget)/
var srcData = {};
var stoplist = new stoplist_1.Stoplist(stoplistFilePath);
var docsFolderPath = path.resolve("docs");
var libFolders = ["core", "content-services", "process-services", "insights"];
var libFolders = ["core", "content-services", "process-services", "insights", "process-services-cloud"];
libsearch(srcData, path.resolve(libFolder));
/*
let keys = Object.keys(srcData);

View File

@@ -29,7 +29,7 @@ let stoplist = new Stoplist(stoplistFilePath);
let docsFolderPath = path.resolve("docs");
let libFolders = ["core", "content-services", "process-services", "insights"];
let libFolders = ["core", "content-services", "process-services", "insights", "process-services-cloud"];
libsearch(srcData, path.resolve(libFolder));
@@ -148,7 +148,7 @@ function getDocFilePaths(folderPath) {
let libPath = path.resolve(folderPath, element);
let files = fs.readdirSync(libPath);
files = files.filter(filename =>
files = files.filter(filename =>
(path.extname(filename) === ".md") &&
(filename !== "README.md") &&
(filename.match(angFilePattern))
@@ -158,7 +158,7 @@ function getDocFilePaths(folderPath) {
result.push(path.join(libPath, element));
});
});
return result;
}
}

View File

@@ -27,7 +27,7 @@ var guideSummaryFileName = path.resolve(docsFolderPath, guideFolderName, "summar
var maxBriefDescLength = 180;
var adfLibNames = ["core", "content-services", "insights", "process-services"];
var adfLibNames = ["core", "content-services", "insights", "process-services", "process-services-cloud"];
var statusIcons;
@@ -41,7 +41,7 @@ function processDocs(mdCache, aggData, _errorMessages) {
function initPhase(aggData) {
statusIcons = aggData.config["statusIcons"] || {};
aggData.stoplist = makeStoplist(aggData.config);
aggData.stoplist = makeStoplist(aggData.config);
aggData.srcData = {};
aggData.mdFileDesc = [];
aggData.mdFileStatus = [];
@@ -298,7 +298,7 @@ function makeMDDocumentedTableRow(docItem, forSubFolder) {
var pathPrefix = "";
if (forSubFolder) {
pathPrefix = "../";
}
@@ -412,4 +412,4 @@ function removeBriefDescLinks(desc) {
link.item.value = link.item.children[0].value;
link.item.children = null;
});
}
}

View File

@@ -10,7 +10,7 @@ var ejs = require("ejs");
var typedoc_1 = require("typedoc");
var mdNav_1 = require("../mdNav");
var ngHelpers_1 = require("../ngHelpers");
var libFolders = ["core", "content-services", "process-services", "insights"];
var libFolders = ["core", "content-services", "process-services", "insights", "process-services-cloud"];
var templateFolder = path.resolve("tools", "doc", "templates");
var excludePatterns = [
"**/*.spec.ts"
@@ -103,24 +103,24 @@ function angNameToClassName(rawName: string) {
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;
}
*/

View File

@@ -20,7 +20,7 @@ import {
} from "../SourceInfoClasses"
let libFolders = ["core", "content-services", "process-services", "insights"];
let libFolders = ["core", "content-services", "process-services", "insights", "process-services-cloud"];
let templateFolder = path.resolve("tools", "doc", "templates");
let excludePatterns = [
@@ -33,9 +33,9 @@ let nameExceptions;
export function processDocs(mdCache, aggData, _errorMessages) {
//initPhase(aggData);
nameExceptions = aggData.config.typeNameExceptions;
let pathnames = Object.keys(mdCache);
let internalErrors;
@@ -74,8 +74,8 @@ function initPhase(aggData) {
let sources = app.expandInputFiles(libFolders.map(folder => {
return path.resolve("lib", folder);
}));
}));
aggData.projData = app.convert(sources);
}
@@ -106,7 +106,7 @@ function updateFile(tree, pathname, aggData, errorMessages) {
let inputMD = getPropDocsFromMD(tree, "Properties", 3);
let outputMD = getPropDocsFromMD(tree, "Events", 2);
updatePropDocsFromMD(compData, inputMD, outputMD, errorMessages);
if (classType === "service") {
let methodMD = getMethodDocsFromMD(tree);
updateMethodDocsFromMD(compData, methodMD, errorMessages);
@@ -146,24 +146,24 @@ function angNameToClassName(rawName: string) {
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;
}
*/
@@ -205,7 +205,7 @@ function getPropDocsFromMD(tree, sectionHeading, docsColumn) {
propTableRow = propsTable.childNav
.tableRow(()=>true, i).childNav;
}
return result;
}
@@ -331,7 +331,7 @@ function updateMethodDocsFromMD(comp: ComponentInfo, methodDocs, errorMessages)
meth.docText = currMethMD.docText;
errorMessages.push(`Warning: empty JSDocs for method sig "${meth.name}" may need sync with the .md file.`);
}
meth.params.forEach(param => {
if (!param.docText && currMethMD && currMethMD.params[param.name])
{
@@ -340,4 +340,4 @@ function updateMethodDocsFromMD(comp: ComponentInfo, methodDocs, errorMessages)
}
});
});
}
}

View File

@@ -25,7 +25,7 @@ var includedNodeTypes = [
"link", "text"
];
var docFolder = path.resolve("docs");
var adfLibNames = ["core", "content-services", "insights", "process-services"];
var adfLibNames = ["core", "content-services", "insights", "process-services", "process-services-cloud"];
var externalNameLinks;
function processDocs(mdCache, aggData, errorMessages) {
initPhase(aggData);
@@ -88,7 +88,7 @@ function updateFile(tree, pathname, aggData, _errorMessages) {
if (link) {
convertNodeToTypeLink(node, node.value, link);
}
} else */
if (node.type === "link") {
if (node.children && ((node.children[0].type === "inlineCode") ||

View File

@@ -35,7 +35,7 @@ const includedNodeTypes = [
];
const docFolder = path.resolve("docs");
const adfLibNames = ["core", "content-services", "insights", "process-services"];
const adfLibNames = ["core", "content-services", "insights", "process-services", "process-services-cloud"];
let externalNameLinks;
@@ -109,7 +109,7 @@ function updateFile(tree, pathname, aggData, _errorMessages) {
if (!includedNodeTypes.includes(node.type)) {
return;
}
/*if (node.type === "inlineCode") {
console.log(`Link text: ${node.value}`);
let link = resolveTypeLink(aggData, node.value);
@@ -117,7 +117,7 @@ function updateFile(tree, pathname, aggData, _errorMessages) {
if (link) {
convertNodeToTypeLink(node, node.value, link);
}
} else */
if (node.type === "link") {
if (node.children && (
@@ -267,7 +267,7 @@ class WordScanner {
this.nextSeparator = 0;
this.next();
}
finished() {
return this.index >= this.text.length;
}
@@ -353,7 +353,7 @@ function handleLinksInBodyText(aggData, text: string, wrapInlineCode: boolean =
matcher.reset();
}
}
let remainingText = text.substring(currTextStart, text.length);
if (remainingText) {

File diff suppressed because it is too large Load Diff