serafim/haxe-watcher

This package is abandoned and no longer maintained. No replacement package was suggested.

Haxe language watcher

Installs: 0

Dependents: 0

Suggesters: 0

Security: 0

Stars: 3

Watchers: 2

Forks: 0

Open Issues: 0

Type:composer-plugin

dev-master 2020-02-14 21:15 UTC

This package is auto-updated.

Last update: 2020-08-14 22:24:32 UTC


README

Requirements

  1. PHP >= 7.4
  2. Haxe Compiler (for local development only)
  3. Composer

Installation

  • composer require serafim/haxe-watcher

Configuration

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"
        }
    }
}

Usage

Haxe Compiler Version

$ composer haxe:version

Run Haxe Watcher

$ composer haxe:watch

Example

Project Structure

- app/
    - Main.hx
- composer.json

Instruction

  1. Create composer.json with following code
{
    "require": {
        "serafim/haxe-watcher": "*"
    },
    "autoload": {
        "psr-4": {
            "app": "app"
        }
    },
    "minimum-stability": "dev",
    "prefer-stable": true
}
  1. Create app/Main.hx with following code:

Main.hx File

module app;

class Main {
    static function main() {
        Sys.println("test");
    }
}
  1. Run watcher: composer haxe:watch