Skip to content

joshtynjala/openfl-modular-sample

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Compile OpenFL with haxe-modular Sample

Compiles an OpenFL project using the haxe-modular library. When a button is clicked, a new module is loaded from the server at runtime.

haxe-modular modifies the behavior of the Haxe compiler to split the generated JavaScript into separate modules when the Bundle.load() method is used.

Usage

Add the modular Haxelib to your project.xml file:

<haxelib name="modular"/>

Run the following commands in your project directory:

npm init -y
npm install haxe-modular --save-dev

That's it! You don't need to do anything special to build and run.

lime test html5 -debug

Requirements

  • haxe-modular 0.14.0 or newer
  • Lime 8.0.0 or newer
  • OpenFL 9.2.0 or newer

Credits

Sample created by Josh Tynjala, the author of Feathers UI and a member of the OpenFL leadership team.

About

A sample OpenFL project that uses the haxe-modular library to load a module dynamically at run-time

Topics

Resources

Stars

Watchers

Forks

Sponsor this project

  •  

Contributors

Languages