Executors
Documents the executors provided by the Nx Forge plugin.
Append --help or -h for any of the plugin executors to explore all available options.
Forge
nx forge <nx-forge-app-name> <forge-cli-options>Runs any Forge CLI command in the <nx-forge-app-name> output directory. Refer to the Forge CLI reference documentation for a list of all available commands.
INFO
Where a custom executor is provided by Nx Forge, prefer using the custom executor over calling the Forge CLI directly.
Options
| Option | Type | Description | Default |
|---|---|---|---|
--outputPath | string[required] | Output path of the Forge app files. | - |
Nx Forge-provided executors ensure that the Nx project configuration is updated where necessary when the Forge command has run. For example, registering a Forge app using nx forge <nx-forge-app-name> register will invoke the Forge CLI directly and only update the Forge app ID in the manifest file in the output directory. The next time you run nx run <nx-forge-app-name>:build the manifest file in the output path will be overwritten. The correct way to do this is to run nx run <nx-forge-app-name>:register, which will update the app ID of the manifest.yml within the <nx-forge-app-name> project root.
Package
nx run <nx-forge-app-name>:packagePackages the Forge app project named <nx-forge-app-name> into a deployable artifact accepted by the Forge platform. Expects the build output from <nx-forge-app-name> app to be available in the outputPath directory.
INFO
The package executor is intended to be used with a standard Nx build target, for example, Webpack or esbuild. Refer to the migration guide for more information.
Options
This executor will copy the output of dependent resource project builds to the resourcePath directory. To do this, the executor tries to infer the output path of dependent resources (Custom UI, UI Kit) from the dependent project's build target configuration as follows:
- if a mapping is defined using
resourceOutputPathMapuse the mapping - else if the
buildtarget definition hasoptions.outputPathdefine use that - else use the
buildtarget'soutputsdefinition, if there is only one entry
In cases where the output path cannot be inferred or is inferred incorrectly, the output path should be defined explicitly using the resourceOutputPathMap option.
Deploy
nx run <nx-forge-app-name>:deployDeploys the Forge app project named <nx-forge-app-name> to the Forge platform.
Mirrors the deploy command of the Forge CLI.
Options
For details on how to use the manifestTransform parameter, refer to the guide on transforming the manifest.
Register
nx run <nx-forge-app-name>:registerRegisters the Forge app project named <nx-forge-app-name> with the Forge platform. This command will automatically update the manifest file in the <nx-forge-app-name> project with the generated app id.
Mirrors the register command of the Forge CLI.
Options
Tunnel Experimental
nx tunnel <nx-forge-app-name>Starts the tunnel target for all Custom UI projects defined in the manifest.yml of the Forge app project named <nx-forge-app-name> on their specified tunnel port. After that, starts a build process in watch mode for the Forge app itself, before ultimately, starting the Forge tunnel process for the Forge app.
Mirrors the tunnel command of the Forge CLI.
Options
| Option | Type | Description | Default |
|---|---|---|---|
--debug-d | boolean | Run Forge tunnel in debug mode. | false |
--verbose-v | boolean | Run Forge tunnel in verbose mode. | false |