HaxeRails
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.hxmlhaxe-rails compiles using hxml file.
3 Add a postscript to hxml path in under the assets/*.js file.
+ //= require haxe_project/compileOr 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]