{"id":17415439,"url":"https://github.com/andyli/jqueryexternforhaxe","last_synced_at":"2025-04-14T21:52:08.213Z","repository":{"id":892741,"uuid":"644171","full_name":"andyli/jQueryExternForHaxe","owner":"andyli","description":"Unleash the full power of jQuery in Haxe.","archived":false,"fork":false,"pushed_at":"2022-12-12T09:48:19.000Z","size":581,"stargazers_count":65,"open_issues_count":7,"forks_count":12,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-04-12T23:32:45.964Z","etag":null,"topics":["externs","haxe","jquery"],"latest_commit_sha":null,"homepage":"http://lib.haxe.org/p/jQueryExtern","language":"Haxe","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"mattheath/puppet-tunnelblick","license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/andyli.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2010-05-03T09:37:00.000Z","updated_at":"2023-08-09T10:49:12.000Z","dependencies_parsed_at":"2023-01-13T10:45:35.584Z","dependency_job_id":null,"html_url":"https://github.com/andyli/jQueryExternForHaxe","commit_stats":null,"previous_names":[],"tags_count":20,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andyli%2FjQueryExternForHaxe","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andyli%2FjQueryExternForHaxe/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andyli%2FjQueryExternForHaxe/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andyli%2FjQueryExternForHaxe/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/andyli","download_url":"https://codeload.github.com/andyli/jQueryExternForHaxe/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248968741,"owners_count":21191158,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["externs","haxe","jquery"],"created_at":"2024-10-17T01:43:14.182Z","updated_at":"2025-04-14T21:52:08.187Z","avatar_url":"https://github.com/andyli.png","language":"Haxe","funding_links":[],"categories":[],"sub_categories":[],"readme":"# NOTICE\n\nThis version of jQuery extern requires Haxe 3.3+. Users of Haxe 3.2.0- should checkout [jQueryExtern 2.0.4](https://github.com/andyli/jQueryExternForHaxe/tree/2.0.4).\n\n------------------------\n\n# jQueryExtern\n\njQueryExtern unleash the full power of [jQuery](https://jquery.com/) in [Haxe](https://haxe.org/). Currently supports jQuery version up to *3.6.0*.\n\nThis library, jQueryExtern, is a drop-in replacement of the externs in the standard library (`js.jquery.*`). It utilizes build macros to provide advanced control over the extern for all the special needs.\n\njQueryExtern allows us to:\n * use a jQuery version other than the one supported in Haxe std lib (see [Version Selection](#version-selection))\n * change how jQuery is referenced in output (see [Changing Native Reference](#changing-native-reference))\n * create jQuery plugin externs (see [Plugin System](#plugin-system))\n\n## Download and Install\n\nInstall via [haxelib](https://haxe.org/doc/haxelib/using_haxelib):\n```\nhaxelib install jQueryExtern\n```\n\nThen add `-lib jQueryExtern` in our hxml.\n\n## Usages\n\n### Version Selection\n\nBy default, jQueryExtern provides API same as the one supported by the std extern. It means that using jQueryExtern will not change the default jQuery version. The default jQuery is *1.6.4* in Haxe 3.2 and earlier. Since Haxe 3.3, the default version is set in compiler define `jquery-ver`. You may check the value of `jquery-ver` using [`haxe.macro.Compiler.getDefine`](https://api.haxe.org/haxe/macro/Compiler.html#getDefine). The version is encoded as an interger. e.g. 1.11.3 is encoded as 11103.\n\njQueryExtern allows changing the supported jQuery version using `js.jquery.Config.setVersion`. It can be called in a hxml file like this:\n```hxml\n--macro js.jquery.Config.setVersion('1.8.3')\n```\nThe function will also set `jquery-ver` to the corresponding integer value automatically.\n\n### Changing Native Reference\n\njQuery in the JS output is referred as `$`, which is an alise of `jQuery`. Some JS libs, eg. [PrototypeJS](https://prototypejs.org/) also use the `$` variable, so we may want to refer jQuery by its original name instead.\n\nTo do so, add the following compiler option:\n```hxml\n--macro js.jquery.Config.setNative('jQuery')\n```\nUnder the surface, it changes the metadata on the JQuery classes from `@:native(\"$\")` to `@:native(\"jQuery\")`.\n\n### Plugin System\n\njQueryExtern introduces the `js.jquery.Plugin` class to ease the process of writing jQuery plugin extern. It is macro-based, responsible for injecting additional fields to the `JQuery` extern class.\n\nTo write a jQuery plugin extern, create an extern class that implements `js.jquery.Plugin`, and start writing the members **as if writing directly inside the `JQuery` extern class**. e.g.:\n\n```haxe\npackage jPlugin;\nextern class JQueryPlugIn implements js.jquery.Plugin {\n    public function myMethod(arg:Dynamic):js.jquery.JQuery;\n    static public function myStaticMethod(arg:Dynamic):Void;\n}\n```\n\nTo use it, add the following compiler option:\n```hxml\n--macro js.jquery.Config.addPlugin('jPlugin.JQueryPlugIn')\n```\n\nNote that currently import statements are not supported in the plugin extern modules. Please use fully-qualified names for types not existed in top-level or `js.jquery`. (see [#20](https://github.com/andyli/jQueryExternForHaxe/issues/20))\n\n## License\n\njQueryExtern is released in the public domain. NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK.\n\njQuery's license can be found at https://jquery.org/license.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandyli%2Fjqueryexternforhaxe","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fandyli%2Fjqueryexternforhaxe","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandyli%2Fjqueryexternforhaxe/lists"}