- PHP >= 7.4
- Haxe Compiler (for local development only)
- Composer
composer require serafim/haxe-watcher
Configuration using extra
section in your composer.json
file:
{
"extra": {
"haxe": {
// Path to Haxe Compiler.
// - Information from the PATH environment variable
// is read by default ("haxe" binary).
"compiler": "/usr/bin/haxe",
// Path to source files.
// - Information from the "autoload" (psr-0, psr-4, classmap)
// section is read by default.
"src": [
"path/to/sources"
],
// Number of milliseconds to check file updates.
// - 60000 by default
"watch": 60000,
// The name of the configuration file generated for
// the Haxe Compiler.
// - "build.hxml" by default
"config": "test.hxml"
}
}
}
$ composer haxe:version
$ composer haxe:watch
- app/
- Main.hx
- composer.json
- Create
composer.json
with following code
{
"require": {
"serafim/haxe-watcher": "*"
},
"autoload": {
"psr-4": {
"app": "app"
}
},
"minimum-stability": "dev",
"prefer-stable": true
}
- Create
app/Main.hx
with following code:
Main.hx File
module app;
class Main {
static function main() {
Sys.println("test");
}
}
- Run watcher:
composer haxe:watch