tailwind

package
v0.1.41 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2026 License: Apache-2.0 Imports: 8 Imported by: 1

Documentation

Overview

Package tailwind provides a Tailwind CSS v4 plugin for GoSPA. It supports configurable paths, content scanning, and both dev/watch and build modes.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	// Input is the source CSS file (default: static/css/app.css).
	Input string `yaml:"input" json:"input"`
	// Output is the compiled CSS file (default: static/dist/app.css).
	Output string `yaml:"output" json:"output"`
	// Content paths to scan for class names.
	Content []string `yaml:"content" json:"content"`
	// Minify enables CSS minification in production.
	Minify bool `yaml:"minify" json:"minify"`
}

Config holds Tailwind plugin configuration.

func DefaultConfig

func DefaultConfig() *Config

DefaultConfig returns the default configuration.

type TailwindPlugin

type TailwindPlugin struct {
	// contains filtered or unexported fields
}

TailwindPlugin provides Tailwind CSS v4 processing.

func New

func New() *TailwindPlugin

New creates a new Tailwind plugin with default configuration.

func NewWithConfig

func NewWithConfig(cfg *Config) *TailwindPlugin

NewWithConfig creates a new Tailwind plugin with the given configuration.

func (*TailwindPlugin) Commands

func (p *TailwindPlugin) Commands() []plugin.Command

Commands returns CLI commands.

func (*TailwindPlugin) Dependencies

func (p *TailwindPlugin) Dependencies() []plugin.Dependency

Dependencies returns required Bun packages.

func (*TailwindPlugin) GetConfig

func (p *TailwindPlugin) GetConfig() *Config

GetConfig returns the current configuration.

func (*TailwindPlugin) Init

func (p *TailwindPlugin) Init() error

Init initializes the plugin.

func (*TailwindPlugin) Name

func (p *TailwindPlugin) Name() string

Name returns the plugin name.

func (*TailwindPlugin) OnHook

func (p *TailwindPlugin) OnHook(hook plugin.Hook, _ map[string]interface{}) error

OnHook handles lifecycle hooks.

func (*TailwindPlugin) SetConfig

func (p *TailwindPlugin) SetConfig(cfg *Config)

SetConfig updates the configuration.

func (*TailwindPlugin) Stop

func (p *TailwindPlugin) Stop()

Stop gracefully stops the Tailwind watcher.

Jump to

Keyboard shortcuts

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