Project

haxe-rails

0.0
No commit activity in last 3 years
No release in over 3 years
Haxe adapter for the Rails asset pipeline.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

Runtime

 Project Readme

HaxeRails

wercker status Test Coverage Code Climate

Haxe adapter for the Rails asset pipeline.

Installation

Add the gem to Gemfile.

gem 'haxe-rails'

Run bundle install.

Usage

1 Create haxe project under the app/assets/javascript.

rails_project/
  app/
    assets/
      javascripts/
        haxe_project

2 Create hxml file under the haxe project directory.

  rails_project/
    app/
      assets/
        javascripts/
          haxe_project
+           compile.hxml

haxe-rails compiles using hxml file.

3 Add a postscript to hxml path in under the assets/*.js file.

+ //= require haxe_project/compile

Or Add a postscript to a hxml file path in Rails.application.config.assets.precompile of the config/initizlizers/assets.rb.

Rails.application.config.assets.precompile += %w( haxe_project/compile.js )

It is necessary for the extension of hxml file to make .js.

Generator

Generate empty project with:

rails g haxe:assets [project name]