sources-loader

Loads source files from disc.

Initializes the source files that will be processed.

SourcesLoader.prototype.before(context)

Propagates the list of files to process.

If the configuration option files is an array it is used otherwise all files in the input directory are added to the list of files to process.

SourcesLoader.prototype.sources(file, context[, options])

Reads a file from disc.

If the file name matches a pattern in the matchers configuration option if is assigned the corresponding file extension so that it will be renamed when the file output path is set.

If the file name matches a pattern in the ignore configuration option it is removed from the list of files to process.

If the file points to a directory it is removed from the list of files to process.

By default this implementation will read the file content and assign the buffer to the file.buffer and set the initial file.content unless the buffer option is disabled.

If the buffer option is disabled the file will still be assigned a stat object.

Returns a promise that resolves when the file has been read.