Skip to content

A sample OpenFL project that uses the Genes library to generate ES Modules instead of plain JS

Notifications You must be signed in to change notification settings

joshtynjala/openfl-genes-sample

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Compile OpenFL with Genes Sample

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

Genes modifies the behavior of the Haxe compiler to split the generated JavaScript into modern modules, instead of a single monolithic bundle. This makes it easier to integrate Haxe projects with other tooling from the JavaScript ecosystem.

Sample created by Josh Tynjala, the author of Feathers UI.

Usage

Add the genes Haxelib to your project.xml file:

<haxelib name="genes"/>

Copy the templates directory from this repository to your project. Then, add the following element to your project.xml file:

<template path="templates" if="html5"/>

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

openfl test html5 -debug

Bundlers

To use a bundler with the JavaScript modules generated with Genes, check out the following projects.

Requirements

  • Genes 0.4.4 or newer
  • Lime 8.0.0 or newer

Credits

Sample created by Josh Tynjala, the author of Feathers UI and core contributor to OpenFL.

About

A sample OpenFL project that uses the Genes library to generate ES Modules instead of plain JS

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

 

Packages

No packages published