@plugjs/plug
Version:
PlugJS Build System ===================
29 lines (28 loc) • 1.11 kB
TypeScript
/** Options for copying files */
export interface CopyOptions {
/** Whether to allow overwriting or not (default `fail`). */
overwrite?: 'overwrite' | 'fail' | 'skip';
/** If specified, use this `mode` (octal string) when creating files. */
mode?: string | number;
/** If specified, use this `mode` (octal string) when creating directories. */
dirMode?: string | number;
/** If specified, this function will be invoked to rename files. */
rename?: (relative: string) => string;
}
declare module '../index' {
interface Pipe {
/**
* Copy the curent {@link Files} to a different directory
*
* @param directory The target directory where files will be copied to
*/
copy(directory: string): Pipe;
/**
* Copy the curent {@link Files} to a different directory
*
* @param directory The target directory where files will be copied to
* @param options Extra {@link CopyOptions | options} for the copy operation
*/
copy(directory: string, options: CopyOptions): Pipe;
}
}