Skip to content

Latest commit

 

History

History
79 lines (57 loc) · 1.91 KB

README.md

File metadata and controls

79 lines (57 loc) · 1.91 KB

consolidator

Greenkeeper badge Build Status codecov NPM version code style: prettier

Consolidate sources to a destination.

Usage

Install with yarn

yarn add consolidator
import {
  consolidate,
  consolidateGlobToFile,
  consolidateFilesToFile,
  consolidateFileToFile
} from 'consolidator'

API

consolidate(sources, destination)

  • sources {String} glob pattern
  • destination {String} file path
consolidate('sources/*', 'destination/consolidated')

consolidate(sources, destination)

  • sources {Array} file paths
  • destination {String} file path
consolidate(
  ['sources/source', 'other-sources/source'],
  'destination/consolidated'
)

consolidateGlobToFile(sources, destination)

  • sources {String} glob pattern
  • destination {String} file path
consolidateGlobToFile('sources/*', 'destination/consolidated')

consolidateFilesToFile(sources, destination)

  • sources {Array} file paths
  • destination {String} file path
consolidateFilesToFile(
  ['sources/source', 'other-sources/source'],
  'destination/consolidated'
)

consolidateFileToFile(source, destination)

  • source {String} file path
  • destination {String} file path
consolidateFileToFile('sources/source', 'destination/consolidated')