ui

package
v0.0.0-...-1b94cb7 Latest Latest
Warning

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

Go to latest
Published: Jan 20, 2023 License: MIT Imports: 12 Imported by: 0

Documentation

Overview

Creates the UI based on the UiConfig

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitializeNextDocker

func InitializeNextDocker(workingDir string, portNum int, expose bool) error

Initializes a Next.js app be buildable by docker.

Types

type BaseUiGenerator

type BaseUiGenerator struct {
}

func NewBaseGenerator

func NewBaseGenerator() *BaseUiGenerator

func (*BaseUiGenerator) GenerateTemplate

func (g *BaseUiGenerator) GenerateTemplate(cfg *TemplateConfig) error

type HuskyOptions

type HuskyOptions struct {
	CommitLint *opts.PackageOptions `yaml:"commitlint"`
	// Might need to change these to include specific formatters/linters and their versions
	Format bool `yaml:"format"`
	Lint   bool `yaml:"lint"`
}

type TailwindAugmenter

type TailwindAugmenter struct {
	Lang      lang.PROGRAMMING_LANGUAGE
	LogWriter io.Writer
	Logger    *zap.SugaredLogger
}

Adds Tailwind to the repository

func NewTailwindAugmenter

func NewTailwindAugmenter(progLang lang.PROGRAMMING_LANGUAGE, logger *zap.Logger, logLvl zapcore.Level) *TailwindAugmenter

func (*TailwindAugmenter) Augment

func (a *TailwindAugmenter) Augment(workingDir string) error

Adds Tailwind to the project following the official docs: https://tailwindcss.com/docs/guides/nextjs This is better than the regular with-tailwind Next.js template because this approach works with Typescript too.

type TemplateConfig

type TemplateConfig struct {
	OutputDirectoryPath string                    `yaml:"output_dir"`
	Base                string                    `yaml:"base"`
	Language            lang.PROGRAMMING_LANGUAGE `yaml:"lang"`
	AugmentOpts         *UiAugmentOptions         `yaml:"augment"`
}

type TemplateGenerator

type TemplateGenerator interface {
	GenerateTemplate(config *TemplateConfig) error
}

type UiAugmentOptions

type UiAugmentOptions struct {
	AddScss             *opts.PackageOptions `yaml:"scss"`
	AddTailwind         *opts.PackageOptions `yaml:"tailwind"`
	AddStyledComponents *opts.PackageOptions `yaml:"styled_components"`
	HuskyOpts           *HuskyOptions        `yaml:"husky"`
	AddDockerfile       bool                 `yaml:"dockerfile"`
	GitOpts             *struct {
		AddIssueTemplates bool `ymal:"issue_templates"`
		AddPRTemplates    bool `yaml:"pr_templates"`
	} `yaml:"git"`

	AddCi string `yaml:"ci"`
}

Jump to

Keyboard shortcuts

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