Create a new IndexGeneratorSource instance
Unique name for this index generator source
The application root directory path
Logger instance for CLI output
Configuration for this index generator source
Set the logger instance used for CLI output
New logger instance to use
Add a file to the virtual file system and regenerate index if needed
If the file matches the configured glob patterns, it will be added to the virtual file system and the index file will be regenerated.
Absolute path of the file to add
Remove a file from the virtual file system and regenerate index if needed
If the file was previously tracked, it will be removed from the virtual file system and the index file will be regenerated.
Absolute path of the file to remove
Generate the index file
This method scans the source directory, processes files according to the configuration, and writes the generated index file to disk.
IndexGeneratorSource handles the generation of a single index file.
This class is responsible for scanning a source directory, processing files according to configuration, and generating an index file that exports the discovered modules. It supports both barrel file generation and custom generation strategies.
Example