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 |
120
+
| Flag | Alias | Description | Default | Required |
|`--sourceDir`|`-s`| The directory where the source files are located. | N/A | * |
123
+
|`--sourceDirs`| N/A | Multiple source directories (space-separated). Cannot be used with `--sourceDir` or `--useSfdxProjectJson`. | N/A | * |
124
+
|`--useSfdxProjectJson`| N/A | Read source directories from `sfdx-project.json` packageDirectories. Cannot be used with `--sourceDir` or `--sourceDirs`. |`false`| * |
125
+
|`--sfdxProjectPath`| N/A | Path to directory containing `sfdx-project.json` (defaults to current directory). Only used with `--useSfdxProjectJson`. |`process.cwd()`| No |
126
+
|`--targetDir`|`-t`| The directory where the generated files will be placed. |`docs`| No |
127
+
|`--scope`|`-p`| A list of scopes to document. Values should be separated by a space, e.g --scope global public namespaceaccessible. |`[global]`| No |
128
+
|`--customObjectVisibility`|`-v`| Controls which custom objects are documented. Values should be separated by a space. |`[public]`| No |
129
+
|`--defaultGroupName`| N/A | The default group name to use when a group is not specified. |`Miscellaneous`| No |
130
+
|`--namespace`| N/A | The package namespace, if any. If provided, it will be added to the generated files. | N/A | No |
131
+
|`--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 |
132
+
|`--includeMetadata `| N/A | Whether to include the file's meta.xml information: Whether it is active and and the API version |`false`| No |
133
+
|`--linkingStrategy`| N/A | The strategy to use when linking to other classes. Possible values are `relative`, `no-link`, and `none`|`relative`| No |
134
+
|`--customObjectsGroupName`| N/A | The name under which custom objects will be grouped in the Reference Guide |`Custom Objects`| No |
135
+
|`--triggersGroupName`| N/A | The name under which triggers will be grouped in the Reference Guide |`Triggers`| No |
136
+
|`--includeFieldSecurityMetadata`| N/A | Whether to include the compliance category and security classification for fields in the generated files. |`false`| No |
137
+
|`--includeInlineHelpTextMetadata`| N/A | Whether to include the inline help text for fields in the generated files. |`false`| No |
138
+
139
+
> **Note:** The `*` in the Required column indicates that **one** of the source directory options must be specified:
140
+
> -`--sourceDir` (single directory)
141
+
> -`--sourceDirs` (multiple directories)
142
+
> -`--useSfdxProjectJson` (read from sfdx-project.json)
143
+
>
144
+
> These options are mutually exclusive - you cannot use more than one at the same time.
129
145
130
146
##### Linking Strategy
131
147
@@ -365,7 +381,8 @@ having to copy-paste the same text across multiple classes, polluting your
365
381
source code.
366
382
367
383
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.
384
+
In the configuration file, you can then define the macro behavior as a key-value pair, where the key is the name of the
385
+
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
399
+
Notice that the `metadata` object contains information about the source of the file for which the macro is being
400
+
injected. This allows you to optionally
383
401
return different text based on the source of the file.
384
402
385
403
Example: Injecting a copyright notice
@@ -402,13 +420,14 @@ And then in your source code, you can use the macro like this:
402
420
* @description This is a class
403
421
*/
404
422
public class MyClass {
405
-
//...
423
+
//...
406
424
}
407
425
```
408
426
409
427
##### **transformReferenceGuide**
410
428
411
-
Allows changing the frontmatter and content of the reference guide, or if creating a reference guide page altogether should be skipped.
429
+
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