new Mitosis()

Details

Ricupero Marco

Methods


<async, static> fetch( srcPath, settings ) → {Promise.<{files: Array.<string>, directories: Array.<string>}>}

Description
Fetch a path for its content and return a Promise which will success with a full list of files
Parameters
Name Type Description
srcPath string target path
settings Object fetch settings
Name Type Attributes Default Description
excludeHidden boolean <optional>
true Determinates if hidden files should be excluded or included in the process
excludeSymLinks boolean <optional>
true Determinates if symbolic links should be excluded or included in the process
Returns
All found files and directories in the given srcPath
Requires
Details

Ricupero Marco


<static> multiCaseReplacer( targetString, replacingString ) → {function}

Description
Generate a custom function wich replace text with the given parameters
Parameters
Name Type Description
targetString string target string to replace with replacingString
replacingString string string to replace with
Returns
Replacing function
Requires
Details

Ricupero Marco


<static> fetch( targetPath ) → {string}

Description
Path ending part
Parameters
Name Type Description
targetPath string target path
Returns
Returns only last directory/resource of the given path, excluding additional parameters
Requires
Details

Ricupero Marco


<async, static> mkDirRecursive( [ cwd ], relativePath ) → {Promise.<void>}

Description
Recursive mkDir creating each dir of the provided path
Parameters
Name Type Attributes Default Description
cwd string <optional>
process.cwd() current working dir
relativePath string target relative path
Returns
Recursive mkDir Promise
Requires
Details

Ricupero Marco


<async, static> copy( srcPath, destPath [, settings ] ) → {Promise.<{files: Array.<string>, directories: Array.<string>}>}

Description
Perform a copy of the source path over the destination path replacing the gin string with the replacing string over file names and contents
Parameters
Name Type Attributes Default Description
srcPath string Source path to copy from
destPath string Destination path to copy to
settings Object <optional>
{targetString, replacingString, cwd} Additional copy settings
Name Type Attributes Default Description
targetString string <optional>
pathFinalDir(srcPath) Target/Source string to replace with replacingString on the copy
replacingString string <optional>
pathFinalDir(destPath) Replacing/Destination string
encoding string <optional>
'utf8' Encoding to use for read/write
cwd string <optional>
process.cwd() Current working directory
Returns
All copied files and directories in the given destPath
Requires
Details

Ricupero Marco