Skip to content

Instantly share code, notes, and snippets.

@lukebayes
Created March 9, 2010 18:34
Show Gist options
  • Save lukebayes/326914 to your computer and use it in GitHub Desktop.
Save lukebayes/326914 to your computer and use it in GitHub Desktop.
Example Rakefile that uses the in-progress HaXe bundle sources
require 'rubygems'
require 'sprout'
# Preliminary Haxe Bundle in vendor:
$:.push(File.dirname(__FILE__) + '/vendor/sprout-haxe-bundle/lib')
require 'sprout/haxe'
####################################
# Configure Project values:
project_name = Sprout::Sprout.project_name = 'Waybeams'
swc_output = "bin/#{project_name}.swc"
debug_input = project_name
debug_output = "bin/#{project_name}.swf"
test_input = "#{project_name}Runner"
test_output = "bin/#{project_name}Runner.swf"
####################################
# Set up Debug compile and run:
haxe debug_output do |t|
t.swf_version = 9
t.input = "actionpack.#{project_name}"
t.debug = true
t.swf_header = '800:500:40:ffffff'
t.source_path << 'src'
end
desc 'Compile and run debug'
flashplayer :debug => debug_output
####################################
# Compile swc file:
haxe swc_output do |t|
t.swf_version = 9
t.input = "actionpack.#{project_name}"
t.source_path << 'src'
end
desc 'Compile SWC'
task :swc => swc_output
####################################
# Set up Test compile and run:
haxe test_output do |t|
t.swf_version = 9
t.input = test_input
t.debug = true
t.swf_header = '640:480:40:ffffff'
t.source_path << 'src'
t.source_path << 'test'
end
desc 'Compile and run test harness'
flashplayer :test => test_output
####################################
task :default => :debug
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment