fix: capturing source directives

This commit is contained in:
Shibo Lyu 2025-08-20 11:47:26 +08:00
parent 506ec1b248
commit cfb5d2a4a2

View file

@ -30,7 +30,7 @@ struct TailwindCSSBuildPlugin: BuildToolPlugin {
"@source"
ZeroOrMore(.whitespace)
"\""
Capture(ZeroOrMore(.word))
Capture { OneOrMore(CharacterClass.anyOf("\"").inverted) }
"\""
ZeroOrMore(.whitespace)
";"
@ -78,9 +78,10 @@ struct TailwindCSSBuildPlugin: BuildToolPlugin {
let outputURL = outputBundleURL.appending(
component: outputCSSFilename, directoryHint: .notDirectory)
print("Tailwind CSS Build Plugin: \(tailwindCSSURL.path)")
print("Tailwind CSS Build Plugin")
print("Tailwind CSS File: \(tailwindCSSURL.path)")
print("Source files: \n -\(sourceURLs.map(\.path).joined(separator: "\n -"))")
print("@source declarations: \(sourcePaths)")
print("Source files: \(sourceURLs.map(\.path))")
print("Output: \(outputURL.path)")
return [