Chapter 14. Building applications for deployment

 

This chapter covers

  • Packaging your application for distribution
  • Setting a custom name and icon for your packaged application
  • Easily packaging applications containing transpiled code using Electron Forge
  • Building source code in Electron archives (asar)

Throughout this book, we’ve built several applications. We’ve started each of them the same way: open the terminal, navigate to the directory, and launch the application using npm. If you’ve downloaded any of my completed applications, then it’s likely that you went to the project on GitHub, cloned the repository, and installed its dependencies. This is all a bit tedious and—frankly—an unacceptable experience for our users. Our Electron applications should behave like any other desktop application. Users should be able to navigate to a website, download the application, and double-click its icon to launch the application. No terminal. No installing dependencies. No cloning repositories.

In this chapter, we take an application that we built earlier in this book—Fire Sale—and build it as a desktop application using a third-party library called Electron Packager. You can find the repository on GitHub at https://github.com/electron-in-action/firesale. We’ll start by checking out a branch conveniently called chapter-14-beginning. This is roughly where we left off in chapter 8.

14.1. Introducing Electron Packager

14.2. Using asar

14.3. Electron Forge

Summary

sitemap