Skip to content
This repository has been archived by the owner on Aug 19, 2019. It is now read-only.

start-runner/copy

Repository files navigation

start-copy

npm linux build windows build coverage deps

Copy task for Start.

Install

npm install --save-dev start-copy
# or
yarn add --dev start-copy

Usage

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