Hot reload / Build on save for Adobe Flex

If you’re not using Adobe Flash Builder for developing Adobe Flex apps, you might be missing the build on save (or build automatically / hot reload) feature.

Here’s a little Node.js utility that does the same. While working on Flex with gedit (or any other text editor), just keep “hotflex” running in the background. It watches all MXML and AS3 files and rebuilds the project on save.

Screenshots

Dependencies

Node.js and NPM are required, refer to – Setup Node.js and NPM on Ubuntu

For notifications on Ubuntu, install libnotify-bin:

    sudo apt-get install libnotify-bin

The Flex SDK is, of course, required and the Flex SDK’s bin folder should be on the $PATH.

Install

From NPM:

    sudo npm install hotflex -g

From GitHub:

    git clone git://github.com/Srirangan/hotflex.git
    cd hotflex
    sudo npm install -g

Configure

You will need to create a hotflex.json file containing the following parameters:

    { "source": "./src/main/flex/main.mxml"
    , "sourceFolder": "./src"
    , "target": "./bin/main.swf"
    , "lib": "./lib"
    }

The lib parameter is optional while the rest are mandatory.

Run

Execute hotflex from the folder containing the hotflex.json file, preferably your project root.

hotflex

Meta

GitHub repository – https://github.com/Srirangan/hotflex
NPM – http://search.npmjs.org/#/hotflex

Todo

  • Integration with Adobe Flex Compiler Shell fcsh for faster builds
  • Integration for Growl for OSX notifications. Currently notifications work for Ubuntu.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>