livebud / bud

The Full-Stack Web Framework for Go
MIT License
5.53k stars 181 forks source link

cli/generate: 'bud generate bud/paths' will now run specific code generators #335

Closed matthewmueller closed 1 year ago

matthewmueller commented 1 year ago

The main purpose of this PR is to make it easier to debug specific code generators because you can run each code generator individually.

For example, you can now generate just the view and controller generator with:

bud generate bud/internal/web/view bud/internal/web/controller

This should encourage the generators that are developed to be more useful as standalone packages.

This PR also removed auto-calling go generate ./.... Since I haven't released a new version since adding bud generate, I'm taking the liberty to make this change now.

I might add it back in with a better use case, but for now, I think bud generate and go generate should be considered different commands that do different things.