@hyperfrontend/features/nx/generators/featurefeature
Nx feature generator. A thin wrapper that scaffolds a hyperfrontend feature by
delegating to the SDK's headless hf init (config resolution, contract loading,
entry wiring). Registered via the package's generators.json.
Usage
nx generate @hyperfrontend/features:feature \
--name=clock --contract=./clock.contract.json --entry=./src/main.ts --directory=apps/clock
| Option | Required | Description |
|---|---|---|
name | yes | Feature name. |
contract | yes | Path to the contract file, relative to the target directory. |
entry | yes | Entry file the generated glue import is wired into. |
directory | no | Directory to scaffold into, relative to the workspace root. |
version | no | Feature version string. |
url | no | URL the generated connector loads the feature from. |
API Reference
ƒ Functions
Scaffold a hyperfrontend feature by delegating to the SDK's
The generator is a thin wrapper: it resolves the target directory from the workspace tree and forwards options to
hf init. The generator is a thin wrapper: it resolves the target directory from the workspace tree and forwards options to
runInit in headless mode, which owns config resolution, contract loading, entry wiring, and writing to disk.Parameters
Returns
Promise<void>A promise that resolves once scaffolding completes.
Example
Scaffold a feature in a project directory
nx generate \@hyperfrontend/features:feature \
--name=clock --contract=./clock.contract.json --entry=./src/main.ts --directory=apps/clock