Using the NX Plugin
The NX plugin for FeatureBoard
Installation
Generators
add-code-gen-target
Adds the code-gen executor to a projects targets.
Required Options
- featureBoardProductName: The name of the FeatureBoard product you want to pull the types from.
- projectName: The name of the project to add the target to.
- template: The type of code the target should generate [dot-net, typescript]
Optional Options
- subFolder: The sub-folder of the project to add the generated code to. Defaults to the root of the project.
- targetName: The name of the target. Defaults to
code-gen
code-gen
Generates code based on FeatureBoard configuration.
Required Options
- featureBoardProductName: The name of the FeatureBoard product you want to pull the types from.
- projectName: The name of the project to add the generated code to.
- template: “The type of the generated code [dot-net, typescript]
Optional Options
- featureBoardApiKey: A FeatureBoard API key. This allows you to run the generator as part of a CI pipeline or other automated process, this should come from a github secret or similar and should not be checked in.
- subFolder: The sub-folder of the project to add the generated code to. Defaults to the root of the project.
Executors
code-gen
Generates code based on FeatureBoard configuration.
Required Options
- featureBoardProductName: The name of the FeatureBoard product you want to pull the types from.
- template: “The type of the generated code [dot-net, typescript]
Optional Options
- featureBoardApiKey: A FeatureBoard API key. This allows you to run the generator as part of a CI pipeline or other automated process, this should come from a github secret or similar and should not be checked in.
- subFolder: The sub-folder of the project to add the generated code to. Defaults to the root of the project.
- dryRun: Only show what would be generated, don’t modify files.
Running executers securely from a GitHub CI pipeline
-
Generate a new “Reader” API key from the API Keys section of the feature board console.
-
Add the new API key to your GitHub repository secrets.
-
Update your CI workflow to run the executer by adding the following workflow step: