@cparra/apexdocs 2.21.0 → 2.23.0-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +52 -16
- package/apexdocs.config.ts +3 -1
- package/docs/types/Classes/nspc.AnotherInterface.md +15 -0
- package/docs/types/Classes/nspc.ChildClass.md +97 -79
- package/docs/types/Main/nspc.SampleClass.md +189 -189
- package/examples/force-app/main/default/classes/AnotherInterface.cls +11 -0
- package/examples/force-app/main/default/classes/ChildClass.cls +12 -0
- package/lib/cli/generate.js +7 -1
- package/lib/cli/generate.js.map +1 -1
- package/lib/model/markdown-file.d.ts +1 -1
- package/lib/model/markdown-file.js +2 -2
- package/lib/model/markdown-file.js.map +1 -1
- package/lib/model/markdown-generation-util/doc-comment-annotation-util.d.ts +1 -0
- package/lib/model/markdown-generation-util/doc-comment-annotation-util.js +17 -2
- package/lib/model/markdown-generation-util/doc-comment-annotation-util.js.map +1 -1
- package/lib/model/markdown-generation-util/field-declaration-util.js +1 -9
- package/lib/model/markdown-generation-util/field-declaration-util.js.map +1 -1
- package/lib/model/markdown-generation-util/method-declaration-util.js +1 -0
- package/lib/model/markdown-generation-util/method-declaration-util.js.map +1 -1
- package/lib/model/markdown-generation-util/type-declaration-util.js +1 -0
- package/lib/model/markdown-generation-util/type-declaration-util.js.map +1 -1
- package/lib/model/markdown-type-file.js +1 -9
- package/lib/model/markdown-type-file.js.map +1 -1
- package/lib/service/walkers/class-walker.js +6 -6
- package/lib/service/walkers/class-walker.js.map +1 -1
- package/lib/service/walkers/enum-walker.js.map +1 -1
- package/lib/service/walkers/interface-walker.js +1 -1
- package/lib/service/walkers/interface-walker.js.map +1 -1
- package/lib/service/walkers/walker.d.ts +3 -0
- package/lib/service/walkers/walker.js +7 -0
- package/lib/service/walkers/walker.js.map +1 -1
- package/lib/settings.d.ts +11 -0
- package/lib/settings.js +10 -0
- package/lib/settings.js.map +1 -1
- package/lib/transpiler/markdown/class-file-generatorHelper.js +2 -2
- package/lib/transpiler/markdown/class-file-generatorHelper.js.map +1 -1
- package/lib/transpiler/markdown/jekyll/jekyll-docsProcessor.d.ts +2 -1
- package/lib/transpiler/markdown/jekyll/jekyll-docsProcessor.js +26 -3
- package/lib/transpiler/markdown/jekyll/jekyll-docsProcessor.js.map +1 -1
- package/package.json +1 -1
- package/src/cli/generate.ts +6 -0
- package/src/model/markdown-file.ts +2 -2
- package/src/model/markdown-generation-util/doc-comment-annotation-util.ts +16 -0
- package/src/model/markdown-generation-util/field-declaration-util.ts +3 -9
- package/src/model/markdown-generation-util/method-declaration-util.ts +3 -1
- package/src/model/markdown-generation-util/type-declaration-util.ts +3 -1
- package/src/model/markdown-type-file.ts +4 -10
- package/src/service/walkers/class-walker.ts +6 -7
- package/src/service/walkers/enum-walker.ts +0 -1
- package/src/service/walkers/interface-walker.ts +1 -1
- package/src/service/walkers/walker.ts +8 -1
- package/src/settings.ts +21 -0
- package/src/transpiler/markdown/class-file-generatorHelper.ts +2 -2
- package/src/transpiler/markdown/jekyll/jekyll-docsProcessor.ts +26 -3
- package/ROADMAP.md +0 -16
|
@@ -3,6 +3,7 @@ import { Type } from '@cparra/apex-reflection';
|
|
|
3
3
|
import { MarkdownHomeFile } from '../../../model/markdown-home-file';
|
|
4
4
|
import { MarkdownTypeFile } from '../../../model/markdown-type-file';
|
|
5
5
|
import { LinkingStrategy } from '../../processor-type-transpiler';
|
|
6
|
+
import { Settings } from '../../../settings';
|
|
6
7
|
|
|
7
8
|
export class JekyllDocsProcessor extends MarkdownTranspilerBase {
|
|
8
9
|
homeFileName(): string {
|
|
@@ -10,17 +11,39 @@ export class JekyllDocsProcessor extends MarkdownTranspilerBase {
|
|
|
10
11
|
}
|
|
11
12
|
|
|
12
13
|
onBeforeProcess = (types: Type[]) => {
|
|
13
|
-
this._fileContainer.pushFile(new MarkdownHomeFile(this.homeFileName(), types, this.
|
|
14
|
+
this._fileContainer.pushFile(new MarkdownHomeFile(this.homeFileName(), types, this.frontMatterForHomeFile));
|
|
14
15
|
};
|
|
15
16
|
|
|
16
17
|
onProcess(type: Type): void {
|
|
17
|
-
this._fileContainer.pushFile(new MarkdownTypeFile(type, 1, this.
|
|
18
|
+
this._fileContainer.pushFile(new MarkdownTypeFile(type, 1, this.getFrontMatterHeader(type)));
|
|
18
19
|
}
|
|
19
20
|
|
|
20
|
-
get
|
|
21
|
+
get frontMatterForHomeFile(): string {
|
|
21
22
|
return '---\nlayout: default\n---';
|
|
22
23
|
}
|
|
23
24
|
|
|
25
|
+
getFrontMatterHeader(type: Type): string {
|
|
26
|
+
const headerLines = ['---'];
|
|
27
|
+
// "layout: default" is a required front matter header for Jekyll
|
|
28
|
+
headerLines.push('layout: default');
|
|
29
|
+
// Add any additional front matter headers that might have been configured in the settings
|
|
30
|
+
const targetType = {
|
|
31
|
+
name: type.name,
|
|
32
|
+
typeName: type.type_name,
|
|
33
|
+
accessModifier: type.access_modifier,
|
|
34
|
+
group: type.group,
|
|
35
|
+
description: type.docComment?.description,
|
|
36
|
+
};
|
|
37
|
+
const configuredHeaders = Settings.getInstance().frontMatterHeader(targetType);
|
|
38
|
+
if (configuredHeaders) {
|
|
39
|
+
configuredHeaders.forEach((header) => {
|
|
40
|
+
headerLines.push(header);
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
headerLines.push('---');
|
|
44
|
+
return headerLines.join('\n');
|
|
45
|
+
}
|
|
46
|
+
|
|
24
47
|
getLinkingStrategy(): LinkingStrategy {
|
|
25
48
|
return 'path-relative';
|
|
26
49
|
}
|
package/ROADMAP.md
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
[ ] Respect access modifiers where the properties/methods are different from the class declaration. For example,
|
|
2
|
-
AuraEnabled properties do not live in an AuraEnabled class, so there's no way to just generate docs to showcase the
|
|
3
|
-
AuraEnabled properties of a class without some sort of combination of also exposing other public/globals
|
|
4
|
-
|
|
5
|
-
[ ] Versioning capabilities. When creating the doc you specify a version number, and a new directory is created for the
|
|
6
|
-
files, instead of just overriding
|
|
7
|
-
|
|
8
|
-
[ ] New generatortype: To JsDocs from AuraEnabled
|
|
9
|
-
|
|
10
|
-
[ ] More unit tests
|
|
11
|
-
|
|
12
|
-
[ ] config.js support to allow for injections, home header, etc.
|
|
13
|
-
|
|
14
|
-
[ ] Add configuration setting that allows someone to set the "namespace"
|
|
15
|
-
|
|
16
|
-
[ ] Homepage support similar to what docsify does
|