Closed matthewmueller closed 2 years ago
Follow-up to: https://github.com/livebud/bud/pull/296
Generators can now generate anywhere. For example, you can define a generator in generator/tailwind:
generator/tailwind
package tailwind import ( "github.com/livebud/bud/package/budfs" ) type Generator struct { Compiler *tailwind.Compiler } func (g *Generator) Register(dir *budfs.Dir) { dir.GenerateFile("bud/internal/tailwind/tailwind.go", func(fsys budfs.FS, file *budfs.File) error { file.Data = []byte("package tailwind\n// compiled tailwind") return nil }) }
Follow-up to: https://github.com/livebud/bud/pull/296
Generators can now generate anywhere. For example, you can define a generator in
generator/tailwind
: