Giter VIP home page Giter VIP logo

enact-template-electron-builder's Introduction

enact-template-electron-builder Travis NPM

A template generator for @enact/cli to create Enact-based Electron applications. Unlike the official template, this alternative uses electron-builder with a more customized and specific workflow that may not suit everyone's needs.

Installation

The Enact CLI itself can install this via NPM or git URI.

enact template install enact-template-electron-builder

Usage

Once installed, you can specify the electron-builder template during new application creation:

enact create -t electron-builder MyApp

Electron Builder Options

In order for the npm run build command to work as intended, information about the project will be sourced from both ./package.json and ./tools/config.json. Please be sure to keep those files up-to-date and accurate. The ./tools/config.json acts as the configuration options for the electron-builder and can be expanded/modified as desired.

Additionally, there is added support for a special buildDependencies array option, which can be added to the ./package.json or added to the extraMetadata object in the ./tools/config.json file (which is the default setup). When used, production dependencies listed in this array will be copied and included,along with their children dependences, during npm run build. This is useful for including main thread dependencies but excluding renderer dependencies.

Automated GitHub Release

A key feature of this template's default configuration is support for automated builds cross-platform for versioned releases.

Setup

  • Enable Travis-CI for your project repository.
  • Create a new GitHub access token from here. It can be called anything, but much have the repo tree of access checkboxed. This will generate a key value for you.
  • On the Travis webpage for your repository, go to the 'Settings' section and set a new environment variable named GH_TOKEN with the value of the key you just generated.

Once that's complete, anytime you push a new tag of a versioned release (eg. 1.0.0), Travis will generate application installers for Window, Mac, and Linux. The application installers will be sent back to your GitHub repository webpage releases section. All that's left is to edit and publish the draft release that's there waiting for you.

Autoupdate Support

A side effect of the automated release process is that this template can provide automatic in-app updating via electron-updater. This has been preconfigured, and as long as automated releases are setup as described above, users will automatically receive and install updates as they're released. If a custom alternate approach is desired, the main thread can be modified to handle the electron-updater API.

enact-template-electron-builder's People

Contributors

jaycanuck avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.