makestatic-sources-loader v1.0.24
Sources Loader
Load file sources into the pipeline
Adds input files to the pipeline.
Install
yarn add makestatic-sources-loaderAPI
SourcesLoader
Initializes the source files that will be processed.
.before
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.
contextObject the processing context.
.sources
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.
fileObject the current file.contextObject the processing context.optionsObject plugin options.
Options
loadBoolean=true the file buffer.
Throws
Errorif the stat fails.Errorif the file read fails.
License
MIT
Created by mkdoc on March 12, 2017
8 years ago
8 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago