Skip to content

antongolub/globby-cp

Repository files navigation

globby-cp

globby-boosted file copying util

Release Maintainability Test Coverage

Install

yarn add globby-cp

Usage

CLI

globby-cp src/*.js dist/
npx globby-cp ./* ./foo/bar --ignore-files .gitignore
Option Description Default
--base-from Base dir for from pattern process.cwd()
--base-to Base dir for to argument process.cwd()
--ignore-files, -i Path to ignoreFile (like .gitignore or .npmignore)
--version -v Print version
--help -h Show help

JS API

import {copy} from 'globby-cp'

await copy({
  from:       'src/**/*.js',
  to:         'dist/',
  baseFrom,   // process.cwd()
  baseTo,     // process.cwd(),
  debug,      // () => {}
  ignoreFiles // undefined
})

globby-cp + git

https://github.com/antongolub/git-glob-cp

License

MIT