galewind

package module
v0.0.0-...-22645fb Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2025 License: MIT Imports: 9 Imported by: 0

README

galewind

Go stand-in for the tailwindcss CLI.

Uses tetratelabs/wazero around Tailwind Oxide and fastschema/qjs around tailwindcss package to keep the tooling in Go. Credit to https://github.com/Semantic-Org/tailwindcss-iso for the Oxide WASM build.

go get -tool github.com/housecat-inc/galewind/cmd/galewind
go tool galewind -i input.css -o output.css -c "**/*.html"
import (
	"github.com/housecat-inc/galewind"
)

ctx := context.Background()
css, err := galewind.Build(ctx, galewind.BuildOpts{
	Content: `<div class="flex p-4 bg-blue-500 text-white">Hello</div>`,
})

Development

brew install golang oven-sh/bun/bun
go generate ./...
go test ./...

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Build

func Build(ctx context.Context, opts BuildOpts) (string, error)

Types

type BuildOpts

type BuildOpts struct {
	Content    string
	CSS        string
	ImportCSS  string
	Candidates []string
	Extension  string
}

type Builder

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

func NewBuilder

func NewBuilder(ctx context.Context) (*Builder, error)

func (*Builder) Build

func (c *Builder) Build(ctx context.Context, opts BuildOpts) (string, error)

func (*Builder) Close

func (c *Builder) Close(ctx context.Context) error

type CandidateWithPosition

type CandidateWithPosition struct {
	Candidate string
	Position  int
}

type Scanner

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

func NewScanner

func NewScanner(ctx context.Context) (*Scanner, error)

func (*Scanner) Close

func (s *Scanner) Close(ctx context.Context) error

func (*Scanner) GetCandidates

func (s *Scanner) GetCandidates(ctx context.Context, content, extension string) ([]string, error)

func (*Scanner) GetCandidatesWithPositions

func (s *Scanner) GetCandidatesWithPositions(ctx context.Context, content, extension string) ([]CandidateWithPosition, error)

Directories

Path Synopsis
cmd
galewind command

Jump to

Keyboard shortcuts

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