Using the new ES5 and ES6 JavaScript samples

Hello everyone!

We have new JavaScript samples, in both ES5 and ES6+ flavors. I wanted to share briefly how to get started:

Download samples

There are two repositories, for ES5- or for ES6-based samples.

You can download a zip (ES5, ES6) or you can clone one of the repositories to get ongoing updates

Open a sample and NPM install

Pick one of the samples (like “BunnyMark”) and run npm install to setup dependencies:

cd openfl-samples-es6/BunnyMark
npm install

Start a dev server

npm start

The project should compile, and open a browser window. Hot reloading is enabled, so make changes to the source *.js files, and the project will automatically rebuild, and the window will reload.

Please post if you have any questions!

2 Likes

Wow, this is a game changer!

Good news! We have more samples up for both ES5 and ES6 JavaScript :slight_smile: