0.1.0-alpha.11 • Published 4 years ago

@webscaffold/task-copy v0.1.0-alpha.11

Weekly downloads
5
License
MIT
Repository
github
Last release
4 years ago

@web-scaffold/task-copy

WEB Scaffold task for copying up folders and files.

Install

$ npm install --save-dev @webscaffold/task-copy

Usage

const copy = require('@webscaffold/task-copy');

await copy(['source/*.png', '!source/goat.png'], 'destination');

This will copy all files from the folder.

The module uses cpy under the hood to copy the files.

API

copy(source, destination, options?)

Returns a Promise<string[]> with the destination file paths.

source

Type: string | string[]

Files to copy.

destination

Type: string

Destination directory.

options

Type: object

Options object that can be passed.

cpy

Type: object

Options are passed to globby.

In addition, you can specify the cpy options.

taskName

Type: string Default: copy

Task name that will be used by the logger to namespace the logs.

taskColor

Type: string Default: #B2DBBF

The color used by the logger to log to the console the task output.

Licensing

MIT © Radu Micu