generators

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 22, 2025 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package generators provides code generation for monox.

Package generators provides Go code generators.

Package generators provides JS framework generators.

Package generators provides Python code generators.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func List

func List() []string

List returns all available generators.

func Register

func Register(language, projectType string, gen Generator)

Register adds a generator to the registry.

Types

type AngularAppGenerator

type AngularAppGenerator struct{}

AngularAppGenerator generates Angular applications.

func (*AngularAppGenerator) Generate

func (g *AngularAppGenerator) Generate(config Config) ([]string, error)

Generate creates a new Angular application.

type AngularLibGenerator

type AngularLibGenerator struct{}

AngularLibGenerator generates Angular libraries.

func (*AngularLibGenerator) Generate

func (g *AngularLibGenerator) Generate(config Config) ([]string, error)

Generate creates a new Angular library.

type Config

type Config struct {
	Name          string
	Path          string
	FullPath      string
	WorkspaceRoot string
	Language      string
	ProjectType   string
	Tags          []string
	DryRun        bool
	// Additional options for JS frameworks
	Style      string // css, scss, tailwind, styled-components, emotion
	Routing    bool
	TypeScript bool
	ESLint     bool
	Standalone bool   // Angular standalone components
	SSR        bool   // Next.js SSR
	AppRouter  bool   // Next.js App Router
	Bundler    string // vite, webpack
	UnitTest   string // jest, vitest
	E2ETest    string // cypress, playwright
	Prefix     string // Angular component prefix
	SrcDir     bool   // Use src directory
}

Config holds configuration for code generation.

type Generator

type Generator interface {
	Generate(config Config) ([]string, error)
}

Generator is the interface for code generators.

func Get

func Get(language, projectType string) (Generator, error)

Get returns a generator by language and project type.

type GoAppGenerator

type GoAppGenerator struct{}

GoAppGenerator generates Go applications.

func (*GoAppGenerator) Generate

func (g *GoAppGenerator) Generate(config Config) ([]string, error)

Generate creates a Go application.

type GoLibGenerator

type GoLibGenerator struct{}

GoLibGenerator generates Go libraries.

func (*GoLibGenerator) Generate

func (g *GoLibGenerator) Generate(config Config) ([]string, error)

Generate creates a Go library.

type NextAppGenerator

type NextAppGenerator struct{}

NextAppGenerator generates Next.js applications.

func (*NextAppGenerator) Generate

func (g *NextAppGenerator) Generate(config Config) ([]string, error)

Generate creates a new Next.js application.

type PythonAppGenerator

type PythonAppGenerator struct{}

PythonAppGenerator generates Python applications.

func (*PythonAppGenerator) Generate

func (g *PythonAppGenerator) Generate(config Config) ([]string, error)

Generate creates a Python application.

type PythonLibGenerator

type PythonLibGenerator struct{}

PythonLibGenerator generates Python libraries.

func (*PythonLibGenerator) Generate

func (g *PythonLibGenerator) Generate(config Config) ([]string, error)

Generate creates a Python library.

type ReactAppGenerator

type ReactAppGenerator struct{}

ReactAppGenerator generates React applications.

func (*ReactAppGenerator) Generate

func (g *ReactAppGenerator) Generate(config Config) ([]string, error)

Generate creates a new React application.

type ReactLibGenerator

type ReactLibGenerator struct{}

ReactLibGenerator generates React libraries.

func (*ReactLibGenerator) Generate

func (g *ReactLibGenerator) Generate(config Config) ([]string, error)

Generate creates a new React library.

Directories

Path Synopsis
Package angular provides generators for Angular applications and libraries.
Package angular provides generators for Angular applications and libraries.
Package nextjs provides generators for Next.js applications.
Package nextjs provides generators for Next.js applications.
Package react provides generators for React applications and libraries.
Package react provides generators for React applications and libraries.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL