


In the end, it turned out that I didn’t have enough knowledge of how electron apps work to understand what was happening here, so I’ll try to give you a brief overview of the architecture of electron apps.
Electron api client file system how to#
But none of these articles explained how to do this when you are using webpack, so no matter what I tried, it didn’t work. I searched for this error related to electron and stumbled upon different articles explaining how to use native node modules with electron. Uncaught ReferenceError: require is not defined We will also use yarn instead of npm because it’s recommended by some of the packages that we will be using.
Electron api client file system install#
We will use the Vue CLI for setting up the project, so the first step is to install the CLI globally. I’ll assume that you have some knowledge of JavaScript, Vue and Node, but other than that, I’ll try to explain every step along the way. Maybe it can save you part of the frustration that I experienced. In this article, I want to share some of these things. However, in the process, I have learned a lot about the architecture of electron apps and – most importantly – how to fend off the most significant security risks. But the project setup turned out to be much more difficult than I had anticipated because I ran into many errors that I could find very little information about online and which I had to solve through tedious trial-and-error. One time only, you'll need to grab the code.I recently started my first electron project because I thought it was the quickest way to build a user interface for a desktop app that I was developing. ngx-drag-drop supports file drag and drop operations and allows tabs to be reordered.angular-split handles all the details of the splits that Elf supports.Font Awesome's awesome library of icons.The context menu is driven by the impressive ngx-contextmenu.Thorsten Hans' ngx-electron to expose Electron's API to Angular.Electron to build a cross-platform desktop app with TypeScript, HTML and CSS.The tree redraws itself in response to changes in its state.Īs always, in addition to ngxs, I have relied heavily on one of the best tech stacks currently available: Rather, they are operations on the underlying file system itself. Actions like copy or move are not operations on a tree. Only the watchers mutate Elf's file system state.

Elf sets file watchers for each open folder. The entire state of Elf - from the clipboard through selection to the tab and view configuration - is managed by ngxs.īest of all, so is the state of the file system. It is an amazing state management pattern and no Angular project should be started IMHO without at least considering it.
