Preset generator
Preset used by create-nx-workspace to scaffold a new Nx workspace with gonx pre-configured. Delegates to the application, library, or go-blueprint generator based on the selected type.
npx create-nx-workspace <workspace> --preset=@naxodev/gonx
Options
Section titled “Options”| Option | Type | Default | Description |
|---|---|---|---|
skipFormat | boolean | false | Skip formatting files. |
type | binary | library | go-blueprint | binary (required; default offered by the prompt) | Define the type of preset to generate. |
directory | string | (required) | The directory of the new application. Accepted as the first positional argument. |
name | string | - | The name of the application. |
tags | string | - | Add tags to the project (used for linting) |
addGoDotWork | boolean | false | Add a go.work file to the project. |
go-blueprint options
Section titled “go-blueprint options”When type is go-blueprint, the following options are also required:
| Option | Type | Default | Description |
|---|---|---|---|
framework | chi | gin | fiber | gorilla/mux | httprouter | standard-library | echo | (required) | Framework to use |
driver | mysql | postgres | sqlite | mongo | redis | scylla | none | (required) | Database drivers to use |
git | commit | stage | skip | (required) | Git to use |
feature | (react | htmx | githubaction | websocket | tailwind | docker)[] | (prompted) | Advanced feature to use |
type=binarydelegates to the application generator;type=librarydelegates to the library generator;type=go-blueprintdelegates to the go-blueprint generator.- When invoked programmatically without go-blueprint values, the preset applies
framework=gin,driver=none,git=skip,feature=[].