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 |
|---|---|---|---|
| type | binary | library | go-blueprint | binary | Template type to generate. Required. |
| directory | string | required | Directory of the new project. Taken from the first positional argument. |
| name | string | - | Name of the project. Must match ^[a-zA-Z][^:]*$. |
| tags | string | - | Tags to add to the project (used for linting). |
| skipFormat | boolean | false | Skip formatting files. |
| 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 | Web framework. |
| driver | mysql | postgres | sqlite | mongo | redis | scylla | none | required | Database driver. |
| git | commit | stage | skip | required | Git handling. |
| feature | array | - | Advanced features: react, htmx, githubaction, websocket, tailwind, docker. |
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=[].