Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tong/hxelectron
Haxe type definitions for electron
https://github.com/tong/hxelectron
electron externs haxe
Last synced: about 23 hours ago
JSON representation
Haxe type definitions for electron
- Host: GitHub
- URL: https://github.com/tong/hxelectron
- Owner: tong
- License: mit
- Created: 2015-03-21T04:05:03.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2024-10-05T13:56:11.000Z (5 months ago)
- Last Synced: 2025-02-10T22:18:43.873Z (8 days ago)
- Topics: electron, externs, haxe
- Language: Haxe
- Homepage:
- Size: 9.96 MB
- Stars: 106
- Watchers: 8
- Forks: 15
- Open Issues: 10
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
HXElectron
==========
Haxe type definitions for [electron](https://electronjs.org/), a framework for building cross-platform desktop applications with JavaScript, HTML, and CSS.[](https://github.com/tong/hxelectron/actions/workflows/test.yml) [](http://lib.haxe.org/p/electron/)
## Install
Release version
```sh
haxelib install electron
```Development version
```sh
haxelib git electron https://github.com/tong/hxelectron.git
```---
## Generate Type Definitions
All type definitions are generated from [electron-api.json](electron-api.json) by [ElectronAPI.hx](ElectronAPI.hx).
To (re)generate for another electron version download the description file from https://github.com/electron/electron/releases and run:
```sh
haxe --macro ElectronAPI.generate("optional/path/to/electron-api.json")
```Build `haxedoc.xml` to insure everything is fine:
```sh
haxe haxedoc.hxml
```By default `hxelectron/electron-api.json` is used if you ommit the path argument to your custom description file.
---
### Metadata
The haxe externs are attributed with following metadata:
- `@:electron_platforms(["Linux"|"macOS"|"Windows"])` the supporting platforms (only if specific).---
## Usage
### Demo Application
Clone this repository and setup:
```sh
git clone https://github.com/tong/hxelectron
cd hxelectron/
haxelib dev electron .
```Build and Run:
```sh
cd demo/
npm install # Install electron
npm run build # Build main.js, app.js
npm start # Run application
```