@tinymce/moxiedoc
Advanced tools
Comparing version 0.2.0-feature.20220319015838049.sha587caf2 to 0.2.0-feature.20220319022440987.shafaa192a
@@ -54,4 +54,8 @@ "use strict"; | ||
const getNameFromFullName = (name) => name.split('.').slice(-1).join(''); | ||
const generateTypeXref = (type) => type.includes('tinymce', 0) ? 'xref:' + basePath + type.toLowerCase() + '.adoc[' + getNameFromFullName(type) + ']' : type; | ||
const generateDefinedByXref = (definedBy) => 'xref:' + basePath + definedBy.toLowerCase() + '.adoc[' + getNameFromFullName(definedBy) + ']'; | ||
const getFilePathFromFullName = (name) => { | ||
const filename = name.toLowerCase() === 'tinymce' ? 'tinymce.root' : name.toLowerCase(); | ||
return basePath + filename + '.adoc'; | ||
}; | ||
const generateTypeXref = (type) => type.includes('tinymce', 0) ? 'xref:' + getFilePathFromFullName(type) + '[' + getNameFromFullName(type) + ']' : type; | ||
const generateDefinedByXref = (definedBy) => 'xref:' + getFilePathFromFullName(definedBy) + '[' + getNameFromFullName(definedBy) + ']'; | ||
const generateExamples = (examples) => { | ||
@@ -58,0 +62,0 @@ let tmp = '\n==== Examples\n'; |
{ | ||
"name": "@tinymce/moxiedoc", | ||
"version": "0.2.0-feature.20220319015838049.sha587caf2", | ||
"version": "0.2.0-feature.20220319022440987.shafaa192a", | ||
"description": "A tool for generating API documentation", | ||
@@ -5,0 +5,0 @@ "author": "Tiny Technologies, Inc", |
@@ -74,7 +74,12 @@ import { Return } from '../../lib/member'; | ||
const getFilePathFromFullName = (name: string): string => { | ||
const filename = name.toLowerCase() === 'tinymce' ? 'tinymce.root' : name.toLowerCase(); | ||
return basePath + filename + '.adoc'; | ||
}; | ||
const generateTypeXref = (type: string): string => | ||
type.includes('tinymce', 0) ? 'xref:' + basePath + type.toLowerCase() + '.adoc[' + getNameFromFullName(type) + ']' : type; | ||
type.includes('tinymce', 0) ? 'xref:' + getFilePathFromFullName(type) + '[' + getNameFromFullName(type) + ']' : type; | ||
const generateDefinedByXref = (definedBy: string) => | ||
'xref:' + basePath + definedBy.toLowerCase() + '.adoc[' + getNameFromFullName(definedBy) + ']'; | ||
const generateDefinedByXref = (definedBy: string): string => | ||
'xref:' + getFilePathFromFullName(definedBy) + '[' + getNameFromFullName(definedBy) + ']'; | ||
@@ -81,0 +86,0 @@ const generateExamples = (examples: Array<{ content: string }>): string => { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
344149
6657