Skip to content

AccentDesign/twgen

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tailwind Template Builder

A Go-based CLI tool to process HTML templates with Tailwind CSS component extraction and production build output.

Features

  • Extracts Tailwind component classes from HTML comments.
  • Generates optimized CSS using Tailwind CLI.
  • Rewrites templates to use component classes and links to the generated CSS.
  • Removes development-only scripts from production templates.

Requirements

Usage

  1. Install dependencies:
go install github.com/accentdesign/twgen@latest
  1. Run the tool:
twgen build --help
Tailwind template builder

Usage:
  build [command]

Available Commands:
  build       Build production templates and CSS
  completion  Generate the autocompletion script for the specified shell
  help        Help about any command

Flags:
      --build-dir string        Output build directory (default "./build")
      --comment-prefix string   Component comment prefix (default "tw:")
  -h, --help                    help for build
      --tailwind-cli string     Path to Tailwind CLI (default "./tailwindcss")
      --template-dir string     Input template directory (default "./templates")

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published