-
mutiny(mutinyopts, readopts) → {ReadStream}
-
Mutates the files of a directory recursively applying specified transform and/or a rename function. The transformed files are saved into the outdir and directory structure is maintained.
Parameters:
Name Type Description mutinyopts
Object Properties
Name Type Description outdir:
String the root of the directory to which to write the transformed/renamed files
transform:
Array.<(function()|String)> that transform each file's content
transform function signature:
function(String):TransformStream
Note: each transform can be a function or a name of an installed transform or a path to a local module
rename:
function renames each file
signature:
function ({String} outfile, {String} outdir, {String} relativeOutfile) : {String} outfile
getOutStream:
function allows overriding the defaultOutStream in case rename is not sufficient
signature:
function ({String} outfile, {String} outdir, {String} relativeOutfile) : {WriteStream}
readopts
Object options passed through to readdirp
Properties
Name Type Description root
String the
root
of the source directory that needs to be specifiedReturns:
which emits 'error' and or 'data' to update mutiny's progress
- Type
- ReadStream
-
transformContent(progress, transforms)
-
Runs all transforms on the content of all files that are piped into its file stream. Reports progress by pushing into the @see progress stream.
Parameters:
Name Type Description progress
Stream into which progress data is pushed
transforms
Array.<function(String): Stream> functions that return a transform stream when invoked with a path to a file - signature of each transform:
function ({String} file) : {TransformStream}
- Source:
Maintenance
Commit Frequency
Further analysis of the maintenance status of mutiny based on released npm versions cadence, the repository activity, and other data points determined that its maintenance is Inactive.
An important project maintenance signal to consider for mutiny is that it hasn't seen any new versions released to npm in the past 12 months, and could be considered as a discontinued project, or that which receives low attention from its maintainers.
In the past month we didn't find any pull request activity or change in issues status has been detected for the GitHub repository.