asarUnpack unpacks parent directory when file is specified
See original GitHub issue- node v6.9.1:
- npm v4.0.5:
- electron-builder v10.15.1:
- Target Build: win (ia32, x64):
- Building On: win x64:
When a relative path from the app directory is passed into the build.asarUnpack
option, the parent directory is copied instead of the file itself.
Example:
In package.json
:
"build": {
"asarUnpack": [
"res/file.json"
]
}
In the shell:
npm run dist -- --win --ia32
Output Directory:
dist\win-ia32-unpacked\resources\app.asar.unpacked\res\
<all files and sub-directories in original app/res
, including file.json
>
Other Notes:
I’m using the two package.json method (even without any external dependencies) if that matters. I will try building this on macOS shortly and reporting back with my results.
Issue Analytics
- State:
- Created 7 years ago
- Comments:11 (4 by maintainers)
Top Results From Across the Web
How to externalise folder with electron? - Stack Overflow
In the electron-builder.json under the build section add "asarUnpack": [ ... your files or folders ].
Read more >Common Configuration - electron-builder
asarUnpack Array<String> | String | “undefined” - A glob patterns relative to the app directory, which specifies which files to unpack when creating...
Read more >Moving two specific files into its parent folder within multiple ...
To move any file named fileA.txt or fileB.txt to its immediate parent directory: find . -maxdepth 4 -type f -name 'file[AB].txt' -execdir mv ......
Read more >paulcbetts/electron-packager NPM
A glob expression, when specified, unpacks the file with matching names to the app.asar.unpacked directory. asar-unpack-dir - String. Unpacks the dir to ...
Read more >Renaming many files to their parent directory name [duplicate]
I want to recursively change many files named raw.tex to parent-directory-hw.tex . Is there a simple scripting solution to this problem?
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
The logs look fine to me:
Here is my development package.json:
@develar thanks so much! this fixed my problem!! woo!