interface Target {
    dest: string;
    flatten?: boolean;
    globbyOptions?: Options;
    rename?: string | ((name) => string);
    src: string | string[];
    transform?: ((buf, matchedPath) => string | Buffer | Promise<string | Buffer>);
}

Properties

dest: string

One or more destinations where to copy.

复制到目标目录。

flatten?: boolean

Remove the directory structure of copied files, if src is a directory.

是否删除复制的文件目录结构,src 为目录时有效。

globbyOptions?: Options

Options for globby. See more at https://github.com/sindresorhus/globby#options

globby 的选项,设置 src 的匹配参数

rename?: string | ((name) => string)

Rename the file after copying.

复制后重命名文件。

Type declaration

    • (name): string
    • Parameters

      • name: string

      Returns string

src: string | string[]

Path or glob of what to copy.

要复制的目录、文件或者 globby 匹配规则。

transform?: ((buf, matchedPath) => string | Buffer | Promise<string | Buffer>)

Transform the file before copying.

复制前转换文件内容。

Type declaration

    • (buf, matchedPath): string | Buffer | Promise<string | Buffer>
    • Parameters

      • buf: Buffer
      • matchedPath: string

      Returns string | Buffer | Promise<string | Buffer>

Generated using TypeDoc