This is a
playground to test code. It runs a full
Node.js environment and already has all of
npm’s 400,000 packages pre-installed, including
electron-accelerator with all
npm packages installed. Try it out:
This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.
Get up and running with a customisable electron build process!
This tool will request some configuration for your new electron project and then:
The end result is a project scaffold that supports building, debugging and releasing for Windows, Linux and Mac platforms.
npm i electron-accelerator -g
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
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]
readme.mdto your project. The read me will describe how to build and release your electron app.
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
To configure your pre-initalized electron accelerator project for automatic updates via Squirrel, use the
Right now this only supports setting up squirrel releases for windows via s3 (watch this space)
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
s3BucketNameThe top level bucket for which your app updates will be uploaded to
s3PrefixNameThe prefix where your application will live under the given bucket
windowsUpdateUrlThe 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.
This project stands on the shoulders of giants. It uses the following packages: