copy
copy copied to clipboard
Recurcively creates directories copying single file
copy.one("public/assets/tmp/font-awesome-4.7.0/css/font-awesome.min.css", "public/assets/css");
This ends up creating the folders
public/assets/tmp/font-awesome-4.7.0/css
inside of:
public/assets/css
I just want to put the file into this directory without all the other dirs.
try passing an options object with {flatten: true}
after the dest
. Also, make sure you add a callback so you're notified of any errors:
(I usually try to commit first before doing new copy operations, might be a good idea here)
var src = "public/assets/tmp/font-awesome-4.7.0/css/font-awesome.min.css",
copy.one(src, "public/assets/css", {flatten: true}, function(err) {
if (err) return console.log(err);
});
Thanks! This is what I was looking for, maybe a suggestion to mention the possible settings of options
in the documentation. I couldn't find them there!
This is what I was looking for here, too. Updating to include what to pass as options would help. I was about to dig into the source to find if this was possible
Updating to include what to pass as options would help. I was about to dig into the source to find if this was possible
I'll make a note on the readme! thanks for the tip.
I'll keep this open as a reminder...
Helped me too.