templates/asproject/as2/project/rakefile.rb in asproject-0.1.35 vs templates/asproject/as2/project/rakefile.rb in asproject-0.1.36
- old
+ new
@@ -1,10 +1,68 @@
-#! rake
-
require 'rubygems'
-require 'rake'
-require 'rake/clean'
-require 'rake/tasklib'
require 'tasks/mtasc'
require 'tasks/hamtasc'
require 'tasks/swfmill'
+require 'tasks/flash_player'
+############################################
+# Launch the Application using Flash Player 8
+
+task :run => [:compile_main]
+
+# Assign this to the default task
+task :default => [:run]
+
+AsProject::FlashPlayer.new(:run) do |t|
+ t.version = 8
+ t.swf = 'bin/<%= project_name %>.swf'
+end
+
+############################################
+# Launch the Test Suites using Flash Player 8
+
+task :test => [:compile_tests]
+
+AsProject::FlashPlayer.new(:test) do |t|
+ t.version = 8
+ t.swf = 'bin/<%= project_name %>Runner.swf'
+end
+
+############################################
+# Compile your library using SWFMill
+
+AsProject::SWFMill.new(:compile_skin) do |t|
+ t.input = 'assets/img/skins/Default.xml'
+ t.output = 'bin/<%= project_name %>Skin.swf'
+end
+
+############################################
+# Compile your Application using HAMTASC
+
+task :compile_main => [:compile_skin]
+
+AsProject::HAMTASC.new(:compile_main) do |t|
+ t.input = '<%= project_name %>'
+ t.rb_entry = '<%= project_name %>.main'
+ t.version = 8
+ t.frame = 2
+ t.input_swf = 'bin/<%= project_name %>Skin.swf'
+ t.output = 'bin/<%= project_name %>.swf'
+ t.class_path << 'src'
+end
+
+############################################
+# Compile your Application using HAMTASC
+
+AsProject::HAMTASC.new(:compile_tests) do |t|
+ t.input = '<%= project_name %>Runner'
+ t.version = 8
+ t.frame = 2
+ t.rb_entry = '<%= project_name %>Runner.main'
+ t.input_swf = 'bin/<%= project_name %>Skin.swf'
+ t.output = 'bin/<%= project_name %>Runner.swf'
+ t.class_path << 'src'
+ t.class_path << 'test'
+ t.class_path << 'lib/asunit'
+end
+
+############################################