Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

npm copyfiles not correct target path

I'm using the npm package "copyfiles" in my buildscript. But the target directory is not that what I expected.

"copy-template": "copyfiles \"./src/**/*.html\" \"dist\"",

My base directory structure is:

src/pages/.../htmlfiles

What I want is:

dist/pages/.../htmlfiles

so the same structure as before without "src" In the moment I have always the src directory in my dist folder.

dist/src/pages/../htmlfiles

Maybe you have some hints for me?

Best David

like image 790
fishme Avatar asked Mar 03 '17 07:03

fishme


1 Answers

Change your script as follows:

...
"scripts": {
  "copy-template": "copyfiles -u 1 \"./src/**/*.html\" \"dist\"",
  ...
},
...

Note, the addition of the --up or -u option as explained in the docs.

like image 168
RobC Avatar answered Nov 15 '22 01:11

RobC