https://github.com/stealjs/steal-electron
Create Electron applications from StealJS projects.
https://github.com/stealjs/steal-electron
Last synced: 3 months ago
JSON representation
Create Electron applications from StealJS projects.
- Host: GitHub
- URL: https://github.com/stealjs/steal-electron
- Owner: stealjs
- License: mit
- Created: 2016-10-22T02:03:39.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2020-05-23T12:11:43.000Z (about 5 years ago)
- Last Synced: 2025-02-09T21:35:58.745Z (3 months ago)
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/steal-electron
- Size: 63.5 KB
- Stars: 2
- Watchers: 12
- Forks: 0
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- License: license.md
Awesome Lists containing this project
README
[](http://badge.fury.io/js/steal-electron)
[](https://travis-ci.org/stealjs/steal-electron)
[](https://coveralls.io/github/stealjs/steal-electron?branch=master)# steal-electron
Create [Electron](http://electron.atom.io/) applications from StealJS projects.
## Install
```shell
npm install steal-electron --save-dev
```## Example
Pass [electronOptions](#electronoptions) and [StealTools.BuildResult](http://stealjs.com/docs/steal-tools.BuildResult.html) to steal-electron:
```js
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](https://github.com/electron-userland/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](http://stealjs.com/docs/steal-tools.build.html) of running StealTools multi-build.
## License
MIT