npm

Need private packages and team management tools?Check out npm Orgs. »

electron-accelerator

0.0.5 • Public • Published

Electron-accelerator

npm version

Get up and running with a customisable electron build process!

This tool will request some configuration for your new electron project and then:

  • Unpack a template to the current working directory.
  • Apply your custom configuration

The end result is a project scaffold that supports building, debugging and releasing for Windows, Linux and Mac platforms.

Installation

npm i electron-accelerator -g

Usage

Electron accelerator has a handful of commands

electron-accelerator <command> [options]

Commands:
  init            initalise an electron project in a given directory
  setup-squirrel  setup a project for releases with Squirrel
  version         display the version of electron-accelerator

Initalize an Electron project

To initialise an electron project: use the init command in the project directory:

Usage: electron-accelerator init -p [platform] -a [architecture]

Example:
$ mkdir my-sweet-app
$ cd my-sweet-app
$ electron-accelerator init -p all -a x64 --application-name my-sweet-app

Required arguments:

-p, --platform             build for              [choices: "all", "darwin", "win32", "linux"]
-a, --architecture         build as               [choices: "all", "x64", "ia32"]


Optional arguments:

--application-name         the application name         [default: "electron-accelerator"]
--authors-name             application author           [default: "human"]
--application-description  a short description          [default: ""]
--repository-url           a git url                    [default: ""]
--debug                    debug output                 [default: false]

This will:

  • Unpack a template to the current working directory.
  • Apply your custom configuration
  • Write a readme.md to your project. The read me will describe how to build and release your electron app.
  • Your new project will support
    • script/bootstrap - quickly and easily set up everything you need to get started with electron development
    • script/build - create custom builds for your required platforms
    • script/server - quickly run up your electron build to test
    • script/server-debug - quickly run up your electron build with node-inspector debugging

Configure automatic updates

To configure your pre-initalized electron accelerator project for automatic updates via Squirrel, use the setup-squirrel command.

Right now this only supports setting up squirrel releases for windows via s3 (watch this space)

Usage: setup-squirrel windows


Usage: electron-accelerator setup-squirrel windows-s3 -d [directory] -b [bucket] -p [prefix] -u [update-url]

Example: electron-accelerator setup-squirrel windows-s3 -d ./ -b windows-updates -p 'electron' -u http://myapp.com/updates

Required arguments:
  -d, --directory      the directory of a pre-initalized electron-accelerator project [default: "."]
  -b, --bucket-name    the s3 bucket that the windows build will be served from
  -p, --bucket-prefix  the s3 bucket prefix that the windows build will be served from                                                                      
  -u, --update-url     the url to update from

This will write the following entries to your projects config.json

  • s3BucketName The top level bucket for which your app updates will be uploaded to
  • s3PrefixName The prefix where your application will live under the given bucket
  • windowsUpdateUrl The update Url for your application

And add the following helper scripts to get you started releasing your application.

  • script/release - quickly release your electron application to any configured squirrel endpoints.

Related projects and reading

This project stands on the shoulders of giants. It uses the following packages:

install

npm i electron-accelerator

Downloadsweekly downloads

1

version

0.0.5

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability