mirror of
https://github.com/laosb/SwiftTailwind.git
synced 2025-11-28 22:01:38 +00:00
refactor: Replace shell script with Swift CLI for artifact bundling
This commit is contained in:
parent
dca866c3a9
commit
5a3c64f599
7 changed files with 386 additions and 107 deletions
|
|
@ -0,0 +1,32 @@
|
|||
import ArgumentParser
|
||||
import Foundation
|
||||
|
||||
@main
|
||||
struct TailwindCSSCLIArtifactBundler: ParsableCommand {
|
||||
static let configuration = CommandConfiguration(
|
||||
commandName: "TailwindCSSCLIArtifactBundler",
|
||||
abstract: "Build TailwindCSS CLI artifact bundles for Swift Package Manager",
|
||||
version: "1.0.0"
|
||||
)
|
||||
|
||||
@Option(name: .shortAndLong, help: "TailwindCSS version to build (e.g., v4.1.14)")
|
||||
var version: String
|
||||
|
||||
@Option(name: .shortAndLong, help: "Working directory for temporary files")
|
||||
var workDir: String = "/tmp/tailwindcss-bundles"
|
||||
|
||||
@Option(name: .shortAndLong, help: "Output directory for the artifact bundle index")
|
||||
var outputDir: String = "."
|
||||
|
||||
func run() throws {
|
||||
print("Building artifact bundles for TailwindCSS version: \(version)")
|
||||
|
||||
let bundler = ArtifactBundleBuilder(
|
||||
version: version,
|
||||
workDir: workDir,
|
||||
outputDir: outputDir
|
||||
)
|
||||
|
||||
try bundler.buildArtifactBundles()
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue