Skip to content

Commit d720464

Browse files
Merge pull request #896 from salesforcecli/js/edit-help
Edit help for "template generate ui-bundle"
2 parents 340e8c1 + 5bddcc6 commit d720464

1 file changed

Lines changed: 14 additions & 10 deletions

File tree

messages/ui-bundle.generate.md

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
11
# summary
22

3-
Generate a UI bundle.
3+
Generate a UI bundle, which contains the code and metadata to build a UI experience that uses non-native Salesforce frameworks, such as React.
44

55
# description
66

7-
Generates a UI bundle in the specified directory or the current working directory. The UI bundle files are created in a folder with the designated name. UI bundle files must be contained in a parent directory called "uiBundles" in your package directory. Either run this command from an existing directory of this name, or use the --output-dir flag to create one or point to an existing one.
7+
Salesforce provides native UI frameworks, such as Lighting Web Components (LWC), to build applications that run on the Salesforce Platform. But you can also use non-native JavaScript- or TypeScript-based UI frameworks, such as React, to build a UI experience for the Salesforce Platform and that you can launch from the App Launcher.
8+
9+
These non-native UI experiences are defined by the "UIBundle" metadata type in your DX project. Use this command to generate the required DX project structure and files. For example, when you run this command and specify the name MyUiBundle, then the files are generated into a "uiBundles/MyUiBundle" directory. Use the --output-dir flag to specify a different directory.
10+
11+
Use the --template flag for generating the files to get started with a speciic UI framework, such as React. Check out the README.md file in the generated "uiBundles/<bundlename>" directory for more information about the template.
812

913
# examples
1014

@@ -16,21 +20,21 @@ Generates a UI bundle in the specified directory or the current working director
1620

1721
<%= config.bin %> <%= command.id %> --name MyReactApp --template reactbasic
1822

19-
- Generate the UI bundle in the "force-app/main/default/uiBundles" directory:
23+
- Generate the React-based UI bundle in the "force-app/main/default/uiBundles" directory:
2024

21-
<%= config.bin %> <%= command.id %> --name MyUiBundle --output-dir force-app/main/default/uiBundles
25+
<%= config.bin %> <%= command.id %> --name MyUiBundle --template reactbasic --output-dir force-app/main/default/uiBundles
2226

2327
# flags.name.summary
2428

25-
Name of the generated UI bundle.
29+
API name of the generated UI bundle.
2630

2731
# flags.name.description
2832

2933
This name can contain only underscores and alphanumeric characters, and must be unique in your org. It must begin with a letter, not include spaces, not end with an underscore, and not contain two consecutive underscores.
3034

3135
# flags.template.summary
3236

33-
Template to use for file creation.
37+
Template to use when creating the files for a specific UI framework.
3438

3539
# flags.template.description
3640

@@ -46,17 +50,17 @@ If not specified, the label is derived from the name.
4650

4751
# flags.output-dir.summary
4852

49-
Directory for saving the created files.
53+
Directory into which the files are created.
5054

5155
# flags.output-dir.description
5256

5357
The location can be an absolute path or relative to the current working directory.
5458

55-
**Important:** The generator automatically ensures the output directory ends with "uiBundles". If your specified path doesn't end with "uiBundles", it's automatically appended. The UI bundle is created at "<output-dir>/<name>".
59+
If not specified, the command reads your sfdx-project.json and defaults to "uiBundles" directory within your default package directory. When running outside a Salesforce DX project, defaults to the current directory.
60+
61+
**Important:** This command automatically ensures the output directory ends with "uiBundles". If your specified path doesn't end with "uiBundles", it's automatically appended. The UI bundle is created at "<output-dir>/<name>".
5662

5763
**Examples:**
5864

5965
- "--output-dir force-app/main/default" → Creates a UI bundle at "force-app/main/default/uiBundles/MyUiBundle/"
6066
- "--output-dir force-app/main/default/uiBundles" → Creates a UI bundle at "force-app/main/default/uiBundles/MyUiBundle/" (no change)
61-
62-
If not specified, the command reads your sfdx-project.json and defaults to "uiBundles" directory within your default package directory. When running outside a Salesforce DX project, defaults to the current directory.

0 commit comments

Comments
 (0)