This repository is private.
All pages are served over SSL and all pushing and pulling is done over SSH.
No one may fork, clone, or view it unless they are added as a member.
Every repository with this icon (
) is private.
Every repository with this icon (
This repository is public.
Anyone may fork, clone, or view it.
Every repository with this icon (
) is public.
Every repository with this icon (
Example Rakefile (ActionScript 3.0)
In an effort to illuminate what our TaskHelpers do for us, this example rakefile should help people that want to create their own custom tasks.
The documentation for the features used here are as follows:
The following file should build against a new project created with:
sprout -n as3 MyProject
The following tasks will be available:
rake # will execute debug
rake test
rake debug
rake deploy
rake cruise
Copy the following into rakefile.rb
require "sprout"
sprout "as3"
default_size = "930 550"
project_name = "MyProject"
##################################
# Define Debug Tasks:
debug_output = "bin/#{project_name}-debug.swf"
debug_input = "src/#{project_name}.as"
desc "Compile the #{debug_output} file"
mxmlc debug_output do |t|
t.input = debug_input
t.default_size = default_size
t.default_background_color = "#FFCC00"
t.source_path << "src"
t.source_path << "assets"
end
desc "Launch the #{debug_output} file"
flashplayer :debug => debug_output do |t|
t.swf = debug_output
end
##################################
# Define Deploy Tasks:
deploy_output = "bin/#{project_name}.swf"
deploy_input = "src/#{project_name}.as"
desc "Compile the #{deploy_output} file"
mxmlc deploy_output do |t|
t.optimize = true
t.input = deploy_input
t.default_size = default_size
t.default_background_color = "#333333"
t.source_path << "src"
t.source_path << "assets"
end
desc "Launch the #{deploy_output} file"
flashplayer :deploy => deploy_output do |t|
t.swf = deploy_output
end
##################################
# Define Test Tasks:
test_output = "bin/#{project_name}Runner.swf"
test_input = "src/#{project_name}Runner.as"
library :asunit3
desc "Compile the #{test_output} file"
mxmlc test_output => :asunit3 do |t|
t.input = test_input
t.default_size = "1000 600"
t.default_background_color = "#333333"
t.source_path << "src"
t.source_path << "assets"
t.source_path << "test"
t.source_path << "lib/asunit3"
end
desc "Launch the #{test_output} file"
flashplayer :test => test_output do |t|
t.swf = test_output
end
##################################
# Define Cruise Task:
cruise_output = "bin/#{project_name}XMLRunner.swf"
cruise_input = "src/#{project_name}XMLRunner.as"
# This is identical to test task, but with
# debug turned on...
desc "Compile the #{cruise_output} file for CI"
mxmlc cruise_output => :asunit3 do |t|
t.input = cruise_input
t.debug = true
t.default_size = "1000 600"
t.default_background_color = "#333333"
t.source_path << "src"
t.source_path << "assets"
t.source_path << "test"
t.source_path << "lib/asunit3"
end
desc "Compile and run the test harness for CI"
fdb :cruise => cruise_output do |t|
t.kill_on_fault = true
t.file = cruise_output
t.run
t.continue
end
##################################
# set up the default rake task
task :default => :debug







