globby-boosted file copying util
yarn add globby-cp
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 |
import {copy} from 'globby-cp'
await copy({
from: 'src/**/*.js',
to: 'dist/',
baseFrom, // process.cwd()
baseTo, // process.cwd(),
debug, // () => {}
ignoreFiles // undefined
})