Comments (17)
When I think of an electron-forge clean
command, that action is definitely not what I think of. I would expect it to delete the output directory, if anything (where package and make put their artifacts).
from forge.
When I think of an electron-forge clean command, that action is definitely not what I think of
now that you mention it, i agree :-)
it would be nice if electron-forge
and all its dependencies create their cache & temporary files inside a .electron/cache
folder inside the project. so that we can just delete it for a clean build
also, it would be nice if the electron builds in the ~/.electron/
folder
are not subject to that rule
because downloading the bigger files every time on every build would be a pain
from forge.
Temporary files should not go into a cache folder. I don't know the details about how electron-compile works, but if it's truly a cache and not just temporary files, it should also live in a cache folder. But that bug should be filed there, not here.
Having a shared cache folder (like ~/.electron/cache
as you suggest) would be problematic. What if two different Electron-related modules had the same name for a file?
FWIW, the download cache is moving to a more appropriate folder soon: electron/get#37
from forge.
Having a shared cache folder (like ~/.electron/cache as you suggest) would be problematic.
What if two different Electron-related modules had the same name for a file?
am suggesting that the cache should not be shared
so if my electron project is at ~/code/electron-todo
then the cache is inside my project ie. ~/code/elecron-todo/.electron/cache
benefit is that there is one cache folder, which we can delete,
to clean up the build.
also, it would be nice if the electron builds in the ~/.electron/ folder
are not subject to that rule
because downloading the bigger files every time on every build would be a pain
the second part was that, the electron distribution which electron-packager (i think)
downloads to the ~/.electron
folder on OSX should not be subject to that rule
ie. it should still be global at ~/.electron
and not be inside ~/code/elecron-todo/.electron/cache
as per the above example.
am saying this because, the file sizes here are relatively huge
this is more like an installed dependency.
on my machine the ~/.electron
folder looks like
➜ .electron ls -al
total 851784
drwxr-xr-x 17 deepak staff 578 Jan 11 15:17 .
drwxr-xr-x+ 123 deepak staff 4182 Jan 21 10:29 ..
-rw-r--r-- 1 deepak staff 6335 Jan 10 11:50 SHASUMS256.txt-1.4.0
-rw-r--r-- 1 deepak staff 2878 Jan 2 17:06 SHASUMS256.txt-1.4.12
-rw-r--r-- 1 deepak staff 2877 Dec 21 17:22 SHASUMS256.txt-1.4.13
-rw-r--r-- 1 deepak staff 2878 Jan 11 15:17 SHASUMS256.txt-1.4.14
-rw-r--r-- 1 deepak staff 3373197 Jan 10 11:50 chromedriver-v2.21-darwin-x64.zip
-rw-r--r-- 1 deepak staff 42111540 Jan 2 17:06 electron-v1.4.12-darwin-x64.zip
-rw-r--r-- 1 deepak staff 41156049 Jan 4 16:04 electron-v1.4.12-mas-x64.zip
-rw-r--r-- 1 deepak staff 42118362 Dec 21 17:22 electron-v1.4.13-darwin-x64.zip
-rw-r--r-- 1 deepak staff 37762216 Dec 28 15:36 electron-v1.4.13-linux-armv7l.zip
-rw-r--r-- 1 deepak staff 44550484 Dec 28 15:23 electron-v1.4.13-linux-ia32.zip
-rw-r--r-- 1 deepak staff 43350836 Dec 28 15:29 electron-v1.4.13-linux-x64.zip
-rw-r--r-- 1 deepak staff 41161005 Dec 28 15:31 electron-v1.4.13-mas-x64.zip
-rw-r--r-- 1 deepak staff 44030471 Dec 28 15:27 electron-v1.4.13-win32-ia32.zip
-rw-r--r-- 1 deepak staff 54339658 Dec 28 15:34 electron-v1.4.13-win32-x64.zip
-rw-r--r-- 1 deepak staff 42116998 Jan 11 15:17 electron-v1.4.14-darwin-x64.zip
from forge.
By shared, I mean between different Electron tools. For example (and this is hypothetical), imagine if Electron Packager had a cached file named metadata.json
with one JSON data structure and electron-winstaller
used the same file name but with a different data structure.
Anyway, you would need to get all of the dependencies of Electron Forge that use cached files to use this cache directory, as necessary. (As you mention, having electron-download
do that would be a bad idea.)
from forge.
By shared, I mean between different Electron tools. For example (and this is hypothetical), imagine > if Electron Packager had a cached file named metadata.json with one JSON data structure and
electron-winstaller used the same file name but with a different data structure.
agree :-)
can it be namespaced by the name of the tool ?
for example,
the root path is still the project, ie. ~/code/elecron-todo/.electron/cache
as per the above example
but electron-packager stores it's temporary files in ~/code/elecron-todo/.electron/cache/electron-packager/metadata.json
and electron-winstaller in ~/code/elecron-todo/.electron/cache/electron-winstaller/metadata.json
from forge.
Closing this out until a more definitive spec for a "clean" command can be presented. Currently this is all a bit vague and more of a discussion than a concrete idea for a new command.
from forge.
I'm getting referenced modules not updating - and older versions seem to be cached somewhere in the build.
Seems somewhat related to this. In the absence of the clean
method - what folder can I blow away manually to have this start fresh?
Thanks.
from forge.
According to this:
...your app's compiled files (via electron-compile) are in the .cache
directory in your app's top-level directory.
from forge.
Oh that's helpful - thanks @malept! I can't see a .cache
folder, but now I can see the code, I'll go take a look around and see where it might be putting it. I'm using the typescript
variant, so might be putting things somewhere different.
from forge.
I can't see the cache
folder and I am not able to find it either.Could you please help me ?
from forge.
The .cache
folder (note the leading period) only exists in packaged apps. In dev mode, it's in a temporary directory.
from forge.
My problem is that I am packaging the app and always getting the same icon despite my efforts for changing it. That's why I think it is a cache problem.
I am looking for the cache file including the period, of course, but I don't see to find any. Maybe it is at a different place, or on some random node_modules subfolder, but deleting node_modules does not help either.
from forge.
Which icon are you referring to? If it's the one in your dock/taskbar, that is cached by the OS.
from forge.
I mean the icon on the file explorer (finder on my case) on the osx installation prompt and yes, also in the dock/taskbar (I'm on OSx by the way).
How can the OS cache the icon if I totally destroy the app and rebuild it ? Should I change the code in order to "invalidate" that cache ?
from forge.
I think the icon's keyed to something in the app metadata.
At any rate, this is off-topic for this GitHub issue. If you need more assistance, please use one of the community forums.
from forge.
Thanks malept. I am getting the same icon over and over again and I though it was related with the caching mechanism (if there is any) that is why I was asking here.
I'll take a look into the community forums.
Thanks
from forge.
Related Issues (20)
- Vite extension hangs on building main code
- Update Docs for cloud-based EV code signing HOT 4
- Electron-Forge - Webpack - Start - ENOSPC
- electron-forge publish hangs on "Preparing native dependencies" HOT 1
- image cannot be resolved when application is packed HOT 4
- Update to latest maintained Node.js engines
- local modules added with npm can break vite-based build HOT 1
- Win32 make from macOs
- Remove hardcoded `node_modules` HOT 1
- Vite plugin seems to preserve symlinks during packageAfterCopy hook
- Is Electron Forge too opinionated?
- "npm run start" startup exception
- npm run make error: DeprecationWarning: Calling promisify on a function that returns a Promise is likely a mistake.
- how to place mac app into Appliactions/{folder}/appName.app rather on /Applications after install via dmg HOT 2
- Allow passing "copyright" config to DEB and RPM makers
- [ERR_MODULE_NOT_FOUND] [ESM] Vite doesn't bundle internal dependencies HOT 5
- Failed at Finalizing package HOT 2
- How to delete AppData folder when uninstall the App? HOT 2
- Error: Multiple plugins tried to take control of the start command, please remove one of them --> vite, fuses HOT 3
- Suggestions for Adding Frontend Framework Integration to the Electron Forge + Vite Template
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from forge.