-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathrakefile.rb
106 lines (91 loc) · 3.48 KB
/
rakefile.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
require 'sprout'
# Optionally load gems from a server other than rubyforge:
# set_sources 'http://gems.projectsprouts.org'
sprout 'as3'
############################################
# Uncomment and modify any of the following:
Sprout::ProjectModel.setup do |model|
model.project_name = 'GithubBadge'
# Default Values:
# model.src_dir = 'src'
# model.lib_dir = 'lib'
# model.swc_dir = 'lib'
# model.bin_dir = 'bin'
# model.test_dir = 'test'
# model.doc_dir = 'doc'
# model.asset_dir = 'assets'
model.language = 'as3'
model.output = "#{model.bin_dir}/GithubBadge.swf"
model.test_output = "#{model.bin_dir}/GithubBadgeRunner.swf"
end
model = Sprout::ProjectModel.instance
############################################
# Set up remote library tasks
# the task name will be converted to a string
# and modified as follows sprout-#{name}-library
# unless you pass t.gem_name = 'full-sprout-name'
# For libraries that contain source code, the
# task name will also be the folder name that
# will be added to ProjectModel.lib_dir
# For a complete list of available sprout gems:
# http://rubyforge.org/frs/?group_id=3688
# You can also search that list directly from a
# terminal as follows:
# gem search -r sprout-*library
library :asunit3
library :corelib
############################################
# Launch the application using the Flash Player
# NOTE: double-quoted strings in ruby enable
# runtime expression evaluation using the
# following syntax:
# "Some String with: #{variable}"
desc "Compile and run main application"
flashplayer :run => model.output
# Make 'run' the default task
task :default => :run
############################################
# Launch the test suites using the Flash Player
desc "Compile and run test suites"
flashplayer :test => model.test_output
############################################
# Compile your application using mxmlc
# Any library tasks that are set as
# dependencies will automatically be added
# to the compiler source or swc paths
desc "Compile application"
mxmlc model.output => [:corelib] do |t|
# Uncomment to use the Flex 3 SDK
t.gem_name = 'sprout-flex3sdk-tool'
t.warnings = true
t.default_background_color = '#FFFFFF'
t.default_frame_rate = 24
t.default_size = '210 400'
t.input = "#{model.src_dir}/GithubBadge.as"
t.source_path << model.asset_dir
# t.source_path << "#{model.lib_dir}/non-sprout-src-library"
# t.library_path << "#{model.lib_dir}/non-sprout.swc"
end
############################################
# Compile test harness using mxmlc
desc "Compile test harness"
mxmlc model.test_output => [:asunit3, :corelib] do |t|
# Uncomment to use the Flex 3 SDK
t.gem_name = 'sprout-flex3sdk-tool'
t.warnings = true
t.default_background_color = '#FFFFFF'
t.default_frame_rate = 24
t.verbose_stacktraces = true
t.default_size = "800 450"
t.input = "#{model.src_dir}/GithubBadgeRunner.as"
t.source_path << model.src_dir
t.source_path << model.test_dir
t.source_path << model.asset_dir
end
############################################
# Build documentation for your application
desc "Create documentation"
asdoc model.doc_dir => model.test_output do |t|
# Uncomment to use the Flex 3 SDK
t.gem_name = 'sprout-flex3sdk-tool'
end