Skip to content

hertleinj/image-killer

Repository files navigation

Angular Logo Electron Logo

ImageKiller

Bei ImageKiller handelt es sich um eine Desktop-App zum aussortieren von Bildern auf der SD-Karte. Dabei ist das Programm alleinig zum aussortieren der Bilder gedacht. Perfekt für einen Workflow mit einem RAW-Editor dessen Picture Management eher nicht sehr ausgeprägt ist oder einem nicht liegt.

Tech-Stack

  • Electron
  • Angular
  • Webcomponents (Vaadin)

Project structure

Folder Description
app Electron main process folder (NodeJS)
src Electron renderer process folder (Web / Angular)

How to import 3rd party libraries

This sample project runs in both modes (web and electron). To make this work, you have to import your dependencies the right way. \

There are two kind of 3rd party libraries :

  • NodeJS's one (like an ORM, Database...)
    • Used in electron's Main process (app folder) have to be added in dependencies of app/package.json
    • Used in electron's Renderer process (src folder) have to be added in dependencies of both app/package.json and package.json (root folder)

Please check providers/electron.service.ts to watch how conditional import of libraries has to be done when using NodeJS / 3rd party libraries in renderer context (i.e. Angular).

  • Web's one (like bootstrap, material, tailwind...)
    • It have to be added in dependencies of package.json (root folder)

You want to use a specific lib (like rxjs) in electron main thread ?

YES! You can do it! Just by importing your library in npm dependencies section of app/package.json with npm install --save XXXXX.
It will be loaded by electron during build phase and added to your final bundle.
Then use your library by importing it in app/main.ts file. Quite simple, isn't it?

Debug with VsCode

VsCode debug configuration is available! In order to use it, you need the extension Debugger for Chrome.

Then set some breakpoints in your application's source code.

Finally from VsCode press Ctrl+Shift+D and select Application Debug and press F5.

Please note that Hot reload is only available in Renderer process.