webextensions/copy-files-from-to

Readme not up to date

Closed this issue · 1 comments

It is not working without adding the files array to filesToCopy and at least have an empty settings object.

{
  "filesToCopy": [
    {
      "from": "../../README.md",
      "to": "../../dist/README.md"
    }
  ],
  "settings": {}
}

Otherwise there are several errors:

    if (settings.addLinkToSourceOfOrigin) {
                 ^

TypeError: Cannot read property 'addLinkToSourceOfOrigin' of undefined
    at writeContents (/foo/node_modules/copy-files-from-to/index.js:158:18)
filesToCopy = filesToCopy.map(function (fileToCopy) {
                          ^

TypeError: Cannot read property 'map' of undefined
    at Object.<anonymous> (/foo/node_modules/copy-files-from-to/index.js:79:27)

This issue has been fixed with b21d8b2

The update has been published at https://www.npmjs.com/package/copy-files-from-to

Now, the README.md file is elaborate and gives proper examples (basic as well as advanced).
Please note that some parts of the file's data structure have been changed.