Files
gulp-haxetool/README.md
T
shmyga bf6ff0deb9
test / test (push) Successful in 6m6s
fix: fix default icon
2026-10-30 00:03:46 +03:00

115 lines
2.2 KiB
Markdown

# Gulp HaXe Tool
[![test](https://git.shmyga.ru/InfernalGames/gulp-haxetool/actions/workflows/test.yaml/badge.svg?branch=master)](https://git.shmyga.ru/InfernalGames/gulp-haxetool/actions?workflow=test.yaml)
## Introducing
### Dignity
- Automatically download HaXe SDK, Neko, FlashPlayer (or RufflePlayer), Android SDK.
- Universal project config for simple HaXe build and OpenFL build.
- Branch project config for many build presets (many OpenFL apps in one project).
- Packaging linux output in DEB.
- Packaging windows output in exe install with InnoSetup.
- Create html wrapper for flash output.
### Flaws
- Hardcode build output in {projectDir}/target (need param in Project.Config).
- HTML5 run output not caught.
- Adobe AIR Build System in progress.
- Windows target depends Visual Studio 2017 build tools
## Example
[Example project](./example)
[`package.json`](./example/package.json)
```json
{
"name": "example",
"type": "module",
"version": "0.0.1",
"scripts": {
"tasks": "hxt",
"build": "hxt default",
"dev": "hxt app:flash:test"
},
"devDependencies": {
"gulp-haxetool": "^1.2.0"
}
}
```
[`haxetool.json`](./example/haxetool.json)
JSON schema: https://shmyga.ru/public/haxetool.schema.json
```json
{
"app": {
"buildSystem": "openfl",
"platforms": ["flash", "html5", "linux", "windows", "android"],
"libs": {
"lime": "8.0.0",
"openfl": "9.2.0",
"hxcpp": "4.2.1"
},
"sources": ["src"],
"main": "Main"
}
}
```
## Commands
### Display tasks list
```bash
npx hxt
```
### Build and pack all presets platform variants
Results places in `target` directory
```bash
npx hxt default
```
### Build and run platform target
```bash
npx hxt <preset>:<platform>:test
```
```bash
npx hxt app:flash:test
npx hxt app:html5:test
npx hxt app:linux:test
npx hxt app:android:test
npx hxt app:windows:test
```
## VS Code settings
JSON schema for `haxetool.json`
```json
{
...
"json.schemas": [
{
"fileMatch": [
"/haxetool.json"
],
"url": "https://shmyga.ru/public/haxetool.schema.json"
}
],
"json.schemaDownload.trustedDomains": {
"https://shmyga.ru/": true
},
...
}
```