Skip to content

stealjs/steal-electron

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
lib
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

npm version Build Status Coverage Status

steal-electron

Create Electron applications from StealJS projects.

Install

npm install steal-electron --save-dev

Example

Pass electronOptions and StealTools.BuildResult to steal-electron:

var stealTools = require("steal-tools");
var stealElectron = require("steal-electron");

var electronOptions = {
  main: "electron-main.js",
  buildDir: "./build",
  platforms: ["darwin"],
  files: ["./**/*"]
};

var buildPromise = stealTools({
  config: __dirname + "/package.json!npm"
});

buildPromise.then(function(buildResult){
	stealElectron(electronOptions, buildResult);
});

API

stealElectron(electronOptions, buildResult) -> Promise

ElectronOptions

These are options that get passed into electron-packager. Aside from the options that takes, these options are also available:

main

Specify your main Electron module:

main: "electron-main.js"

If the main does not exist, steal-electron will add a generate Electron module to your project.

indexPage

Specify the index HTML page to use. This is the page that Electron will use to launch your application.

indexPage: "index.production.html"

glob

Alias for files. Specify a glob pattern of files to move into the destination folder.

BuildResult

The result of running StealTools multi-build.

License

MIT