0.2.0 • Published 9 years ago
start-copy v0.2.0
start-copy
Copy task for Start.
Install
npm install --save-dev start-copy
# or
yarn add --dev start-copyUsage
import start from 'start';
import reporter from 'start-pretty-reporter';
import files from 'start-files';
import copy from 'start-copy';
export const build = () => start(reporter())(
files('src/**/*.png'),
copy('build/')
);is functionally the same as:
import start from 'start';
import reporter from 'start-pretty-reporter';
import files from 'start-files';
import read from 'start-read';
import write from 'start-write';
export const build = () => start(reporter())(
files('src/**/*.png'),
read(),
write('build/')
);but it uses Streams and should be the preferred way to copy files, especially for large and/or binary formats like images.
This task relies on array of files and provides the same, see documentation for details.
Arguments
copy(dir)
dir– output directory, will be created automatically if it doesn't exists