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: 5 days 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 (over 9 years ago)
- Default Branch: master
- Last Pushed: 2024-09-09T07:42:23.000Z (2 months ago)
- Last Synced: 2024-09-09T09:24:10.215Z (2 months ago)
- Topics: electron, externs, haxe
- Language: Haxe
- Homepage:
- Size: 9.66 MB
- Stars: 105
- 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.[![test](https://github.com/tong/hxelectron/actions/workflows/test.yml/badge.svg)](https://github.com/tong/hxelectron/actions/workflows/test.yml) [![Haxelib Version](https://img.shields.io/github/tag/tong/hxelectron.svg?style=flat-square&colorA=EA8220&colorB=FBC707&label=haxelib)](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
```