Grunt-Haxe は約 3 年前に構築されました。NPM haxelib と一緒にインストールすると、純粋な JavaScript をコンパイルする方法が提供されましたが、JqueryExtern ライブラリを利用できないという 1 つの問題がありました。を追加しても、jQueryクラスを使用しようとすると、見つからないというエラーが毎回スローされますimport jQuery.*
。*.Hx ファイルは Haxetoolkit で正常にコンパイルされますが、haxe-NPM、haxelib、grunt-haxe では同じように動作しません。コンパイル時に JqueryExtern ライブラリを無視するだけです。
これが私のうなり声の構成です-これらの失敗を引き起こしている何かがありますか? 私が使用している haxe のバージョンは Haxe 3.2.1 です。Haxe にgulp watch
割り当てられたタスクが必要になるため実行できませんが、それはまだ存在しません。
haxe: {
complete_example: {
main : 'Main',
classpath: [ app.src.hx],
libs : ['jQueryExtern' ], /*specify haxelib libraries */
//flags : [ 'something', 'createjs' ], /* define conditional compilation flags */
//macros : [ 'Mymacro.doSomethingCool()' ], /*call the given macro*/
//resources: [ 'activity/xml/map-layout.json@map_layout' ], /*define named resource files*/
//misc : [ '-debug', "--dead-code-elimination", "--js-modern" ], /* add any other arguments*/
output : app.dest.js + 'hx.js',
onError : function ( e ) {
/*custom error message */
console.log( 'There was a problem...\n' + e );
},
force : true /*continue processing task (like --force)*/
}
}
grunt.loadNpmTasks( 'grunt-haxe' );