serafim / haxe-watcher
此包已被废弃且不再维护。未建议替代包。
Haxe 语言监视器
dev-master
2020-02-14 21:15 UTC
Requires
- php: >=7.4
- composer-plugin-api: ^1.1
- yosymfony/resource-watcher: ^2.0
Requires (Dev)
- composer/composer: ^1.9
This package is auto-updated.
Last update: 2020-08-14 22:24:32 UTC
README
需求
- PHP >= 7.4
- Haxe 编译器(仅限本地开发使用)
- Composer
安装
composer require serafim/haxe-watcher
配置
使用 composer.json
文件中的 extra
部分进行配置
{ "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" } } }
使用
Haxe 编译器版本
$ composer haxe:version
运行 Haxe 监视器
$ composer haxe:watch
示例
项目结构
- app/
- Main.hx
- composer.json
说明
- 使用以下代码创建
composer.json
{ "require": { "serafim/haxe-watcher": "*" }, "autoload": { "psr-4": { "app": "app" } }, "minimum-stability": "dev", "prefer-stable": true }
- 使用以下代码创建
app/Main.hx
Main.hx 文件
module app; class Main { static function main() { Sys.println("test"); } }
- 运行监视器:
composer haxe:watch