question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Hidden 'dotfiles' within an extraResources folder aren't copied

See original GitHub issue
  • 5.18.0:
  • Mac:

Using electron-builder to build a Mac .app file. My resources include some Python libraries, and they store some files in a folder called .dylibs. So the tree looks like (simplified):

Repo root
|- vendor
|  |- tide-packages
|  |  |- PIL
|  |  |  |- image.py
|  |  |  |- .dylibs
|  |  |  |  |- libjpeg.dylib

I’ve specified the vendor folder in extraResources in my package.json, and everything inside it is copied, except the .dylibs folder. I think its due to the use of minimatch in the copy filter.

Currently the workaround is to add another rule in package.json:

  "build": {
    "extraResources": [
      "vendor",
      "vendor/**/.*",
      "vendor/**/.*/**",
    ],
  }

I didn’t expect this to be needed, though, since I don’t expect glob to be used when there are no wildcards in the path.

Ref: https://github.com/tingbot/tide-electron/issues/42

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
joerickcommented, Sep 8, 2016

My absolute preferred solution would be: when a folder is explicitly listed as something to copy, only exclude files within that we know are useless in a production build - .DS_Store, thumbs.db, .git, etc.

Just checked Xcode’s copy command… it does the following-

builtin-copy -exclude .DS_Store -exclude CVS -exclude .svn -exclude .git -exclude .hg -resolve-src-symlinks $SRC $DEST
0reactions
joerickcommented, Sep 13, 2016

👍 no worries!

Read more comments on GitHub >

github_iconTop Results From Across the Web

javascript - Electron - How to add external files? - Stack Overflow
Managed to solve it by using extraResources. Should be declared under build in your package.json file. For example: Create a new folder ......
Read more >
Why are a ton of my dotfiles missing? They aren't in ... - Reddit
To clarify: I have already checked the "Show Hidden Files" filter in the restore UI, and verified that a few other dotfiles are...
Read more >
https://raw.githubusercontent.com/Murriouz/vrrv-bu...
... Hidden 'dotfiles' within an extraResources folder aren't copied ([7877f71](https://github.com/electron-userland/electron-builder/commit/7877f71)), ...
Read more >
builder-util-runtime | Yarn - Package Manager
HTTP utilities. Used by electron-builder. changelog. (2022-11-22). Bug Fixes. get CI tag in ...
Read more >
Windows explorer always shows dot files - Microsoft Community
Windows explorer always shows dot files even if hidden items is unchecked. Hidden folders show and hide as usual. Maybe a registry setting?...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found