Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RunTailwind ¶
RunTailwind compiles the project's Tailwind CSS once (single-shot, synchronous). It reads from resources/css/input.css and writes to public/css/output.css using the standalone Tailwind CLI binary at .forge/bin/tailwindcss (zero npm dependency).
Returns an error if the binary is not installed or compilation fails. Run 'forge tool sync' to download the Tailwind CLI binary.
func RunTailwindWatch ¶
RunTailwindWatch starts the Tailwind CLI in --watch mode for continuous compilation during development. The returned *exec.Cmd can be used by the caller to stop the process (cmd.Process.Kill() or cmd.Wait() after cancellation).
Used by 'forge dev' to recompile CSS whenever .templ files change.
func ScaffoldTailwindInput ¶
ScaffoldTailwindInput creates the initial Tailwind CSS input file for a new project. Uses the scaffold-once pattern: existing files are never overwritten to preserve developer customizations.
Creates:
- resources/css/input.css — Tailwind v4 @import directive
Tailwind v4 auto-detects content sources from all non-gitignored files, so no tailwind.config.js is needed.
Types ¶
type DevServer ¶
type DevServer struct {
ProjectRoot string
Config *config.Config
// contains filtered or unexported fields
}
DevServer orchestrates the development workflow: watch + parse + generate.
func NewDevServer ¶
NewDevServer creates a new development server.