reference1 min readv1
Generators
Run a generator with pnpm nx g @empire-builder-kit/nx:<name>. Generators write source. None of them contacts AWS.
On this page
Generators
| Generator | What it does |
|---|---|
preset | Creates the workspace. @empire-builder-kit/create runs it for you. |
slice | Adds a Product Slice. |
site | Adds the root site (--mode=static by default, or --mode=nextjs). |
sql | Adds PostgreSQL to a Slice. |
function | Adds a Function to a Slice. |
function-access | Sets a Function to signed-in or anonymous. |
service | Adds a Service to a Slice. |
job | Adds a Job to a Slice. |
upgrade | Updates the managed files of the workspace, the Foundation, the site or a Slice. |
Examples
bash
pnpm nx g @empire-builder-kit/nx:slice billing
pnpm nx g @empire-builder-kit/nx:site
pnpm nx g @empire-builder-kit/nx:sql billing --reason="Invoices need foreign keys." --apply
pnpm nx g @empire-builder-kit/nx:function invoice --slice=billing --feature=operations
pnpm nx g @empire-builder-kit/nx:upgrade billing --applyThe sql and upgrade generators report by default and change files only with --apply. nx:site defaults to --mode=static; pass --mode=nextjs for a server-rendered root site.