Internal
Function
Internal
mergeAn alias for this package's mergeArgs().
Inputs can be undefined, and if so, the default is returned.
Default object type.
Default values (if not specified in inputs).
Optional
inputs: undefinedOverriding values (changes to make).
Optional
recursive: booleanOptional. Whether to merge the object recursively. Default false.
Resulting object with all the defaults
and inputs
keys with
either default values or input values, as appropriate.
Passing recursive
as false means that the input type must be a Partial
(not RecursivePartial).
Optional
recursive: falsePassing recursive
as true means that the input type may actually be a
RecursivePartial.
Universal overload.
Optional
inputs: IOptional
recursive: booleanReadonly
Internal
argsA completed args object.
Internal
Default args for this stage.
Internal
Build a complete args object.
Optional
args: Partial<Args> | RecursivePartial<Args>Readonly
Internal
consoleUsed to output messages within the class.
Readonly
Internal
ncThe instance of NodeConsole used within this class.
Internal
Overrides the default function to return a string representation of this object.
Internal
Copies files from one directory to another, maintaing their relative directory structure.
Glob patterns for paths to copy.
Depth level for output to the console.
Path to directory where matched files will be copied.
Optional
sourceDir: null | stringRelative source directory. If any, the globs are resolved as relative to that directory and the path/dir structure copied to the outputDir is relative to this sourceDir.
Optional
args: Partial<FileSystemType.Copy.Args>Overrides for default options.
Array of paths to the newly-copied files/etc.
Experimental
Copies a file to another path.
Location to write file.
Location to copy the source path to.
Optional
args: Partial<CopyFileArgs>Optional configuration.
Path to file if written, or false on failure.
Internal
Deletes given globs (via node.NodeFiles.delete).
Glob patterns for paths to delete.
Depth level for output to the console.
Optional
dryRun: booleanIf true, files that would be deleted are printed to the console and not deleted.
Optional
args: Partial<FileSystemType.Glob.Args>Optional glob configuration.
Experimental
Read the paths within a directory.
Directory to read.
Optional
args: Partial<ReadDirArgs>Optional configuration.
Paths within the given directory.
Internal
Reads a file.
File to read.
Optional
args: Partial<ReadFileArgs>Optional configuration.
Contents of the file.
Internal
Writes a file.
Location to write file.
Contents to write.
Optional
args: Partial<WriteFileArgs>Optional configuration.
Path to file if written, or false on failure.
Internal
Changes just the file name of a path
Full path with updated basename.
Internal
Gets the valid paths matched against the input globs.
Glob patterns to match.
Optional
args: Partial<FileSystemType.Glob.Args>Optional glob configuration.
Matched paths.
Internal
Returns relative paths, based on the root defined the the opts.
Path to make relative.
Internal
Resolves relative to the root defined the the opts.
Paths to resolve.
Internal
Returns a unique version of the inputPath (i.e., where no file exists) by appending a number.
Path to make unique.
Absolute, unique version of the given inputPath
.
NodeFiles.changeBaseName Used to update the basename to test for uniqueness.
Internal
Runs minify on the given file globs.
Glob patterns for paths to minify.
File format for the input globs.
Depth level for output to the console.
Optional
args: Partial<FileSystemType.Minify.Args>Overrides for default options.
Optional
renamer: (path: string) => stringFunction used to define the new basename for the minified files, if any.
Paths to the minified files (both source and output).
Internal
Runs prettier on the given file globs.
Glob patterns for paths to run through prettier.
File format for the input globs.
Optional
args: Partial<FileSystemType.Prettier.Args>Overrides for default options.
Paths to the formatted files.
Internal
Replaces the given text or regex in the given file globs.
Glob patterns for paths to replace in.
Replacements to make. The first tuple item is a string or RegExp to find and the second item is a string to replace.
Depth level for output to the console.
Optional
args: Partial<FileSystemType.Glob.Args>Optional glob configuration.
Paths to the replaced files.
Shape of the file/path utility class.
Defined here so that the type can easily be used before the FileSystem class is defined.
Since
0.1.0-alpha