You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
|`--sourceDir`|`-s`| The directory where the source files are located. | N/A | Yes |
117
-
|`--targetDir`|`-t`| The directory where the generated files will be placed. |`docs`| No |
118
-
|`--scope`|`-p`| A list of scopes to document. Values should be separated by a space, e.g --scope global public namespaceaccessible. |`[global]`| No |
119
-
|`--customObjectVisibility`|`-v`| Controls which custom objects are documented. Values should be separated by a space. |`[public]`| No |
120
-
|`--defaultGroupName`| N/A | The default group name to use when a group is not specified. |`Miscellaneous`| No |
121
-
|`--namespace`| N/A | The package namespace, if any. If provided, it will be added to the generated files. | N/A | No |
122
-
|`--sortAlphabetically`| N/A | Sorts files appearing in the Reference Guide alphabetically, as well as the members of a class, interface or enum alphabetically. If false, the members will be displayed in the same order as the code. |`false`| No |
123
-
|`--includeMetadata `| N/A | Whether to include the file's meta.xml information: Whether it is active and and the API version |`false`| No |
124
-
|`--linkingStrategy`| N/A | The strategy to use when linking to other classes. Possible values are `relative`, `no-link`, and `none`|`relative`| No |
125
-
|`--customObjectsGroupName`| N/A | The name under which custom objects will be grouped in the Reference Guide |`Custom Objects`| No |
126
-
|`--triggersGroupName`| N/A | The name under which triggers will be grouped in the Reference Guide |`Triggers`| No |
127
-
|`--includeFieldSecurityMetadata`| N/A | Whether to include the compliance category and security classification for fields in the generated files. |`false`| No |
128
-
|`--includeInlineHelpTextMetadata`| N/A | Whether to include the inline help text for fields in the generated files. |`false`| No |
124
+
| Flag | Alias | Description | Default | Required |
|`--sourceDir`|`-s`| The directory where the source files are located. | N/A | * |
127
+
|`--sourceDirs`| N/A | Multiple source directories (space-separated). Cannot be used with `--sourceDir` or `--useSfdxProjectJson`. | N/A | * |
128
+
|`--useSfdxProjectJson`| N/A | Read source directories from `sfdx-project.json` packageDirectories. Cannot be used with `--sourceDir` or `--sourceDirs`. |`false`| * |
129
+
|`--sfdxProjectPath`| N/A | Path to directory containing `sfdx-project.json` (defaults to current directory). Only used with `--useSfdxProjectJson`. |`process.cwd()`| No |
130
+
|`--targetDir`|`-t`| The directory where the generated files will be placed. |`docs`| No |
131
+
|`--scope`|`-p`| A list of scopes to document. Values should be separated by a space, e.g --scope global public namespaceaccessible. |`[global]`| No |
132
+
|`--customObjectVisibility`|`-v`| Controls which custom objects are documented. Values should be separated by a space. |`[public]`| No |
133
+
|`--defaultGroupName`| N/A | The default group name to use when a group is not specified. |`Miscellaneous`| No |
134
+
|`--namespace`| N/A | The package namespace, if any. If provided, it will be added to the generated files. | N/A | No |
135
+
|`--sortAlphabetically`| N/A | Sorts files appearing in the Reference Guide alphabetically, as well as the members of a class, interface or enum alphabetically. If false, the members will be displayed in the same order as the code. |`false`| No |
136
+
|`--includeMetadata `| N/A | Whether to include the file's meta.xml information: Whether it is active and and the API version |`false`| No |
137
+
|`--linkingStrategy`| N/A | The strategy to use when linking to other classes. Possible values are `relative`, `no-link`, and `none`|`relative`| No |
138
+
|`--customObjectsGroupName`| N/A | The name under which custom objects will be grouped in the Reference Guide |`Custom Objects`| No |
139
+
|`--triggersGroupName`| N/A | The name under which triggers will be grouped in the Reference Guide |`Triggers`| No |
140
+
|`--includeFieldSecurityMetadata`| N/A | Whether to include the compliance category and security classification for fields in the generated files. |`false`| No |
141
+
|`--includeInlineHelpTextMetadata`| N/A | Whether to include the inline help text for fields in the generated files. |`false`| No |
142
+
143
+
> **Note:** The `*` in the Required column indicates that **one** of the source directory options must be specified:
144
+
> -`--sourceDir` (single directory)
145
+
> -`--sourceDirs` (multiple directories)
146
+
> -`--useSfdxProjectJson` (read from sfdx-project.json)
147
+
>
148
+
> These options are mutually exclusive - you cannot use more than one at the same time.
129
149
130
150
##### Linking Strategy
131
151
@@ -365,7 +385,8 @@ having to copy-paste the same text across multiple classes, polluting your
365
385
source code.
366
386
367
387
A macro can be defined in your documentation using the `{{macro_name}}` syntax.
368
-
In the configuration file, you can then define the macro behavior as a key-value pair, where the key is the name of the macro, and the value is a function that returns the text to inject in place of the macro.
388
+
In the configuration file, you can then define the macro behavior as a key-value pair, where the key is the name of the
389
+
macro, and the value is a function that returns the text to inject in place of the macro.
Notice that the `metadata` object contains information about the source of the file for which the macro is being injected. This allows you to optionally
403
+
Notice that the `metadata` object contains information about the source of the file for which the macro is being
404
+
injected. This allows you to optionally
383
405
return different text based on the source of the file.
384
406
385
407
Example: Injecting a copyright notice
@@ -402,13 +424,14 @@ And then in your source code, you can use the macro like this:
402
424
* @description This is a class
403
425
*/
404
426
public class MyClass {
405
-
//...
427
+
//...
406
428
}
407
429
```
408
430
409
431
##### **transformReferenceGuide**
410
432
411
-
Allows changing the frontmatter and content of the reference guide, or if creating a reference guide page altogether should be skipped.
433
+
Allows changing the frontmatter and content of the reference guide, or if creating a reference guide page altogether
This example demonstrates the new **sfdx-project.json support** feature in ApexDocs, which allows you to automatically read source directories from your Salesforce project configuration instead of manually specifying them.
4
+
5
+
## Feature Overview
6
+
7
+
ApexDocs now supports three ways to specify source directories:
8
+
9
+
1.**Single Directory** (`--sourceDir`) - The traditional approach
0 commit comments