globcopy
Copy files based on glob patterns
Installation
Install globcopy with npm
npm install @erwinstone/globcopy -g
Usage/Examples
cli:
data.json :
{
"vendor/bootstrap": "node_modules/bootstrap/dist/js/bootstrap.bundle.*",
"vendor/summernote": [
"node_modules/summernote/dist/**/*",
"!node_modules/summernote/dist/**/*.{zip,txt}"
]
}
globcopy data.json
globcopy data.json --watch
javascript api:
npm install @erwinstone/globcopy
import { globcopy, globcopyRaw } from '@erwinstone/globcopy'
await globcopy({
path: './data.json',
})
// or
await globcopy({
path: './data.json',
watch: true,
})
// or
await globcopyRaw(
JSON.stringify({
'vendor/bootstrap': 'node_modules/bootstrap/dist/js/bootstrap.bundle.*',
'vendor/summernote': [
'node_modules/summernote/dist/**/*',
'!node_modules/summernote/dist/**/*.{zip,txt}'
],
})
)