Documentation
¶
Overview ¶
Package tailwind manages the pinned Tailwind CSS standalone binary (REQ-STY-01). It downloads the binary for the host platform, verifies the sha256 from gx.lock and runs it. Node is never involved.
Index ¶
Constants ¶
const DefaultBaseURL = "https://github.com/tailwindlabs/tailwindcss/releases/download"
DefaultBaseURL is the release download root.
const DefaultVersion = "v4.3.3"
DefaultVersion is the pinned Tailwind release.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Lock ¶
type Lock struct {
Tailwind LockEntry `json:"tailwind"`
}
Lock is the gx.lock shape. The file is machine-written.
func DefaultLock ¶
func DefaultLock() Lock
DefaultLock returns the built-in pin of the official release.
type LockEntry ¶
type LockEntry struct {
Version string `json:"version"`
SHA256 map[string]string `json:"sha256,omitempty"`
}
LockEntry pins one tool.
type Manager ¶
type Manager struct {
// Root is the module root that holds gx.lock and gx.toml.
Root string
// Cache overrides the binary cache directory.
Cache string
// BaseURL overrides the release download root, for mirrors (REQ-STY-12)
// and tests.
BaseURL string
// Client is the HTTP client, or http.DefaultClient.
Client *http.Client
}
Manager fetches and runs the pinned binary.
func (*Manager) Build ¶
Build runs the pinned Tailwind binary on themePath and returns the CSS (REQ-STY-02). The output also lands in .gx/app.css.
func (*Manager) Ensure ¶
Ensure returns the path of the verified binary, downloading it when the cache is cold (REQ-STY-01).