copyfiles icon indicating copy to clipboard operation
copyfiles copied to clipboard

--exclude with quoted glob does not seem to work

Open marceloverdijk opened this issue 6 years ago • 5 comments

I have a npm script like:

"copy:resources": "copyup --exclude \"**/*.ts\" \"./src/**/*\" build",

It copies all files, including the *.ts files. I don't want the *.ts files to be copied. I'm running on OSX and if understand correctly I should quote the glob.

marceloverdijk avatar Feb 03 '19 22:02 marceloverdijk

Same thing is happening to me. The below copies everything including the node_modules folder.

copyfiles -a -e "./node_modules" **/* destinationfolder

thomashoggard avatar Feb 06 '19 13:02 thomashoggard

the exclude options get passed directly to glob so it may be an issue there

calvinmetcalf avatar Feb 08 '19 13:02 calvinmetcalf

copyup -e \"./src/**/*.ts\" \"./src/**/*\" \"build\"

your glob needs to be more explicit, I ran in to this myself.

dwjft avatar Mar 06 '19 18:03 dwjft

I had to use the syntax -e=./src/**/*.tx to make it work

chadjaros avatar Jul 29 '20 15:07 chadjaros

Facing the same issue?

copyfiles(
  ['./src/assets/**', './dist'],
  {
    all: true,
    up: 1,
    exclude: ['**/stats.txt']
  },
  (err) => err && console.error(err)
);

totszwai avatar Jun 30 '22 16:06 totszwai