@@ -0,0 +1,24 @@
|
||||
[presets.haxe]
|
||||
variables.haxe_version_default = "{{ 'package.json' | read | get('haxe') or '4.2.5' }}"
|
||||
variables.haxe_version = "{{ 'HAXE_VERSION' | env(haxe_version_default) }}"
|
||||
variables.neko_version_default = "{{ 'package.json' | read | get('neko') or '2.2.0' }}"
|
||||
variables.neko_version = "{{ 'NEKO_VERSION' | env(neko_version_default) }}"
|
||||
variables.neko_sdk = "{{ 'NEKO_SDK' | env(home + '/sdk/neko/' + neko_version) }}"
|
||||
variables.haxe_sdk = "{{ 'HAXE_SDK' | env(home + '/sdk/haxe/' + haxe_version) }}"
|
||||
variables.haxe_activate = ". {{ neko_sdk }}/activate && . {{ haxe_sdk }}/activate &&"
|
||||
variables.haxe_sources = []
|
||||
variables.haxe_sources_str = "{% for item in haxe_sources %}-s \"{{ item }}\" {% endfor %}"
|
||||
variables.haxe_formatter = "{{ ((haxe_sdk + '/lib/formatter') | file) and ('./hxformat.json' | file) }}"
|
||||
conditions = ["{{ haxe_sdk | file }}"]
|
||||
|
||||
[presets.haxe.tasks.lint.formatter]
|
||||
conditions = ["{{ haxe_formatter }}"]
|
||||
commands = [
|
||||
"{{ haxe_activate }} haxelib run formatter --check {{ haxe_sources_str or '.' }}",
|
||||
]
|
||||
|
||||
[presets.haxe.tasks.format.formatter]
|
||||
conditions = ["{{ haxe_formatter }}"]
|
||||
commands = [
|
||||
"{{ haxe_activate }} haxelib run formatter {{ haxe_sources_str or '.' }}",
|
||||
]
|
||||
Reference in New Issue
Block a user