Node.is
Node Package Manager
Electron

Introduction
AppStudio now supports the use of some of the most important new technologies in the web development world.
Metaphorically, Flotato uses the Mac’s native WebKit engine, so, in theory, it should be much less onerous on your processor and RAM than Electron apps or, in some cases, Chrome tabs.
Node.js is a runtime environment that executes JavaScript code outside the browser. That makes it suitable for writing server side software, which would normally be done in PHP or other languages. It works by having an executable stub which is able to call the V8 JavaScript engine, which powers Chrome.
npm is a repository of code which can be used with Node.js. It's included when you download Node. There is a huge number of packages available - over 750,000 at last count. You can include these packages in your Node project to add functionality. It might be for convenience: there are a lot of libraries which are much easier to include in your project than to write yourself. It might be for functionality: the modules can implement features which would not be available in the browser.
An example of a convenient library would be Lodash which adds hundreds of additional functions to JavaScript. A missing feature library would be fs-extra which allows full access to the file system.
How To Run Electron App
Electron is framework which allows for the development of desktop GUI applications. Since it's built on Node.js, it already has the ability to run JavaScript code. It also uses Chrome's browser engine to render the UI using regular HTML. Each Electron app includes the V8 Runtime as well as the Chrome browser. Slack, Github Desktop and WhatsApp are examples of apps built using Electron.
How is this compare to VoltBuilder?
VoltBuilder (Cordova) is used to package apps for iOS and Android. Spectacle app mac donate. Electron is used to package apps for Windows, MacOS and Linux. It's quite reasonable to have one AppStudio project that you use with both VoltBuilder and Electron, letting you build for all 5 platforms.
Nodejs/npm modules are similar to VoltBuilder Plugins. Since they are operating system specific, Cordova Plugins will not work with Electron (and vice versa).
Tutorial: Make an Electron app
AppStudio allows you to make normal AppStudio apps (programmed in Javascript or BASIC) into full blown Electron apps. You can distribute these apps as regular executables, able to run on Windows, MacOS and Linux.
In this tutorial, we're going to use a module from npm called weather-js to create an app which gets weather data from weather.service.msn.com. It's very convenient: we don't have to figure out the MSN API to use it.
We recommend using AppStudio 8 (or later) with this tutorial.
Set up the project
1. Download and install Node. (This also installs npm.)
2. Using AppStudio, create a new project called ElectronWeather and save it. (You can also use the ElectronWeather sample with comes with AppStudio by opening it and doing a 'Save As' elsewhere, to create a fresh copy. If you do this, several steps below can be skipped - follow the instructions)
3. Enter 'Weather App' into description in Project Properties.
Howto install ipad apps on macos catalina safari. You can even extend your desktop using iPad as a second display. Gorgasmash, Rendered my otherwise functioning 2012 macbook unusableThis update crashed my 2012 macbook. And now coming to Mac, your favorite iPad apps. It had been working just fine, but this update broke all of my apps, and made my computer super slow.
4. In Project Properties, go to the Electron section and open package.json. Modify the 'dependancies' line as follows: (Skip this step if you're using the sample).
This includes the Weather-js Node library from npm.
5. To add your own icon, follow these steps. (Skip this step if you're using the sample).
- Put an png file at least 512x512 in your project directory.
- Set VoltBuilder icon(1024) to that icon in Project Properties.
Add the Weather Code

1. Add a button to Form1.
2. In the Code Window for Form1, paste the following code. You'll notice there is a new function called 'require' in the first line. This function is part of Node.js: it loads the module of that name.
Since this function is not part of JavaScript, the project will not run in the browser as a normal project would.
Run the App
Now we're ready to run the app. On the Run menu, choose 'Run Desktop App using Electron'
Some notes
- The Chrome Dev Tools window opens by default. We'll need this if we are going to debug the app.
- To turn off the Chrome Dev Tools, set 'Chrome Dev Tools' to false in Project Properties.
- The 'Electron Security Warning' in the console can be ignored.
Distributing the App
We now have a running app. The next step is to package it for distribution. We can make regular executables for distribution on MacOS, Windows and Linux. The packaging has to done on a computer running the OS we are targeting: the MacOS version needs to be build on a Mac, etc.
There is more documentation on packaging at https://www.electron.build/. You'll need to pay special attention to code signing requirements.
You can click on any chapter to jump to that chapter.You can maneuver around the Table of Content to skip chapters.Laura McCamy/Business InsiderHow to buy books for your Kindle appIf you don't have any books in your Kindle library yet, it's easy to download them. You can even find and download titles for free. You will need an Amazon account to download books to your Kindle app. How to read kindle books on mac without app.
On the Run menu, choose 'Make Desktop App for Distribution using Electron'. If the build fails, look at the log in 'About AppStudio' for more information.
When the build is complete, you will find the executable in your project folder, in
electron/ElectronWeather/dist/*
Tips
Setting Electron Runtime Options
The operation of Electron apps at runtime can be changed by modifying the electronMain.js module. It's in the Electron section of Project Properties.
You can learn more about the options in ElectronMain.js.
How to tell if you are running Electron at runtime
How to tell if you are running Windows or MacOS at runtime
Debugging
Run Electron App On Mac Shortcut
- Check the AppStudio Log in 'About AppStudio'. It will have more info.
- To reset the Electron environment, simply delete the electron folder in your project. It will be recreated next time you start your app.
- To start your Electron app in a console, open it in the electron folder of your project directory and enter:
- To build your Electron distributable in a console, open it in the electron folder of your project directory and enter:

In this lesson, you will learn how to build native desktop apps with Angular and Electron. You might be surprised how easy it is to start building high-quality desktop apps for any platform, or even port your existing Angular app to native desktop platforms.
This lesson covers the following topics:
- Configure Electron 1.7 with Angular.
- Build a simple timer app in Angular.
- Package the app for install on Windows 10, macOS, and Linux Ubuntu.
Initial Setup
Let’s kick things off by building a new angular app from scratch.
Generate the Angular App
Generate a default app with the Angular CLI.
Update index.html
The generated root page in Angular points the base href to / - this will cause problems with Electron later on, so let’s update it now. Just add a period in front of the slash in src/index.html.
Install Electron
You can install Electron in the Angular development environment.
Configure Electron
The next step is to configure Electron. There are all sorts of possibilities for customization and we’re just scratching the surface.
Electron Ios App
main.js
Create a new file named main.js in the root of your project - this is the Electron NodeJS backend. This is the entry point for Electron and defines how our desktop app will react to various events performed via the desktop operating system.
The createWindow function defines the properties of the program window that the user will see. There are many more window options that faciliate additional customization, child windows, modals, etc.
Notice we are loading the window by pointing it to the index.html file in the dist/ folder. Do NOT confuse this with the index file in the src/ folder. At this point, this file does not exist, but it will be created automatically in the next step by running ng build --prod
That’s it for the Electron setup, all the desktop app magic is happens under the hood.
Custom Build Command
The deployed desktop app will be an Angular AOT build - this happens by default when you run ng build --prod. It’s useful to have a command that will run an AOT production build and start Electron at the same time. This can be easily configured in the package.json file.
package.json
Run the command
You can run your angular app as an native desktop app with the following command.
Timesheet locking to prevent backdated changes. Alerts for progress and time review on projects. Best free mac time tracking app download. Add time for others on your team if they forget themselvesWhat Clockify users say.
At this point, you can run the command (it will take a few seconds) and it will create the dist/ folder and will automatically bring up a window on your operating system with default Angular app.
This setup does not support hot code reloads. Whenever you change some Angular code, you need to rerun the electron-build command. It is possible to setup hot reloads by pointing the window to a remote URL (such as https://localhost:4200) and running `ng serve` in a separate terminal.
Electron Mac App Store
Building the Angular App
Now we need to build an Angular App that’s worthy of being installed. I am building a single page timer that will animate a progress circle, then make a chime sound when complete.
To keep things super simple, I am writing all the code in the app.component
Install Round Progress Bar
To get the progress timer looking good quickly, I installed the angular-svg-round-progressbar package. It gives us a pre-built component that we can animate based on the current state of the timer.
Then add it to the app.module.ts (also add the FormsModule).
app.component.ts
The app works by allowing the user to set the number of seconds the timer will run max. The timer progresses by running an RxJS Observable interval every 10th of a second and incrementing the current value.
I also defined several getters help deal with NaN values that can cause errors in the progress circle. They also help keep the HTML logic clean and readable.
app.component.html
In the HTML, we can declare the progress component and display the user interface elements conditionally based on the state of the timer.
Packaging for Desktop Operating Systems
Now that we have a decent app ready for desktops, we need to package and distribute it. The electron packager tool will allow to package our code into an executable for desktop platforms - including Windows (win32), MacOS (darwin), and Linux. Keep in mind, there are several other electron packaging tools that might better fit your needs.
Linux and MacOS developers will need to install [WineHQ](https://www.winehq.org/) if they plan on building desktop apps for Windows.
Electron Builder Mac
In this example, I am going to build an executable for Windows.
This will generate a directory /angular-electron-win32-x64/ that contains the executable file.
Run Electron App On Macbook
And why not build one for MacOS while we’re at it.
This will generate a directory /angular-electron-darwin-x64/ that contains the app. Zip it and extract it on a mac system and you should be able to run it natively. You will get warnings that it’s from an unknown developer, but this is expected and it’s perfectly safe to open - it’s your own code after all.