Sublime Text 3 で Haxe を触るメモ

FIRST STEP to Haxe/JavaScriptを参考にしてHaxe環境を入れて試しました。

Haxeのインストール

$ brew install haxe

Sublime Text 3 の設定

{
    "color_scheme": "Packages/User/Flatland Dark (SL).tmTheme",
    "detect_indentation": true,
    "ensure_newline_at_eof_on_save": true,
    "font_face": "Ricty",
    "font_size": 15.0,
    "highlight_line": true,
    "highlight_modified_tabs": true,
    "ignored_packages":
    [
        "Vintage"
    ],
    "line_padding_top": 2,
    "theme": "Flatland Dark.sublime-theme",
    "translate_tabs_to_spaces": true,
    "trim_trailing_white_space_on_save": true,
    "word_wrap": true
}

プロジェクトファイルなど書いて実行

hushin/Hello-Haxe at v0.1
Cmd + B で実行。bin/index.htmlを開くとアラートが表示される。

grunt

Haxe と Grunt で Javascript の開発環境を作る - Qiita

試してみました haxe-study/grunt-try at master · hushin/haxe-study 簡単に出来ていい。 Gruntfile.js のwatchの設定がうまく動かなかったので下記のように修正。

       watch: {
            files: 'src/**.hx',
            tasks: ['haxe:project']
        },