Skip to content
Empire Builder KitDocumentation
v1 Documentation

Find your next step.

Search the complete documentation, including code examples.

    Full-text search↑ ↓ navigate Enter open
    Browse documentation
    DocsReference

    Generators

    Run a generator with pnpm nx g @empire-builder-kit/nx:<name>. Generators write source. None of them contacts AWS.

    On this page
    1. Generators
    2. Examples

    Generators

    GeneratorWhat it does
    presetCreates the workspace. @empire-builder-kit/create runs it for you.
    sliceAdds a Product Slice.
    siteAdds the root site (--mode=static by default, or --mode=nextjs).
    sqlAdds PostgreSQL to a Slice.
    functionAdds a Function to a Slice.
    function-accessSets a Function to signed-in or anonymous.
    serviceAdds a Service to a Slice.
    jobAdds a Job to a Slice.
    upgradeUpdates 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 --apply

    The 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.