webextensions/copy-files-from-to

Allow a folder as target when the source is not a glob

Closed this issue · 1 comments

When specifying local files or remotes it would also be nice have a folder as the target.
Currently the target is always treated as a file name (except when the source is a glob), even when it ends with a slash.

Having a folder as a target would especially be helpful when an array of local files or remotes would be supported.

@tharders

Now with the latest release (https://github.com/webextensions/copy-files-from-to/releases/tag/v3.8.0), support for copying a file to a directory, without providing the filename has been added. The feature can be used with the following syntax:

// Copy the file at the mentioned path into the target directory
{
    "from": "src/app/images/favicon.ico",
    "to": "public/"
}

Marking resolved 👍