Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type FileProcessor ¶
FileProcessor is an interface for processing files.
type MinifierProcessor ¶
func (*MinifierProcessor) Process ¶
func (p *MinifierProcessor) Process(inputFilePath, outputFilePath, markerName string) error
type PassthroughProcessor ¶
type PassthroughProcessor struct{}
StandardProcessor processes files without modifications.
func (*PassthroughProcessor) Process ¶
func (p *PassthroughProcessor) Process(inputFilePath, outputFilePath, markerName string) error
Process simply inserts the raw content from the input file into the output file.
type ProcessorFactory ¶
type ProcessorFactory struct {
Production bool // Whether to use minification
}
ProcessorFactory provides the correct FileProcessor based on file extension.
func (*ProcessorFactory) GetProcessor ¶
func (f *ProcessorFactory) GetProcessor(filePath string) FileProcessor
GetProcessor returns the appropriate FileProcessor.
type ProcessorFactoryInterface ¶
type ProcessorFactoryInterface interface {
GetProcessor(filePath string) FileProcessor
}
ProcessorFactoryInterface defines the behavior of a processor factory.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.