/
Buildfile
198 lines (151 loc) · 6.97 KB
/
Buildfile
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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
# ===========================================================================
# Project: Abbot - SproutCore Build Tools
# Copyright: ©2009 Apple Inc.
# portions copyright @2006-2011 Strobe Inc.
# and contributors
# ===========================================================================
# Default buildfile loaded by all projects. Any options you put into your
# project buildfile will override these defaults.
# Import all build tasks
import *Dir.glob(File.join(File.dirname(current_path), 'buildtasks', '**', '*.rake'))
mode :all do
config :all,
# REQUIRED CONFIGS
# You will not usually need to override these configs, but the code
# assumes they will be present, so you must support them.
:build_prefix => 'tmp/build',
:staging_prefix => 'tmp/staging',
:cache_prefix => 'tmp/cache',
:url_prefix => 'static',
# Defines the directories that may contain targets, and maps them to a
# target type. When a project tries to find all of the targets in a
# project, it will use this map to find them.
:target_types => {
:apps => :app,
:clients => :app,
:pages => :app, # used for static pages with your site
:frameworks => :framework,
:themes => :theme,
:modules => :module
},
# Allows the target to have other targets nested inside of it. Override
# this in your target Buildfile to disable nesting.
:allow_nested_targets => true,
# The default preferred language. Assets will be pulled from this
# language unless otherwise specified.
:preferred_language => :en,
# Do not include fixtures in built project.
:load_fixtures => false,
# Do not include debug directory in built project
:load_debug => false,
# Do not load protocols in production mode
:load_protocols => false,
# Do not build tests.
:load_tests => false,
# Generate a combined javascript and stylesheet
:combine_javascript => true,
:combine_stylesheets => true,
# Use @charset "UTF-8" by default
:css_charset => "UTF-8",
# We do NOT want to pad sprites for debugging in production. This both increases filesize
# and makes the background of the sprite an embarrassing pink.
:pad_sprites_for_debugging => false,
# Optimizing sprites is good, but some apps that (appeared) to work before may break with
# this turned on. :pad_sprites_for_debugging makes the errors very visible, and that IS
# turned on in dev by default, so hopefully we should be able to make this default eventually.
#
# For reference, optimized sprites lay out sprites horizontally in addition to vertically.
:optimize_sprites => false,
# enable the hack that splits CSS into files with only ~4000 selectors for IE
:split_css_for_ie => true,
# by default all targets autobuild
:autobuild => true,
# by default minify javacript and stylesheets
:minify => true,
# use the default layout defined in SproutCore
:layout => 'sproutcore:lib/index.rhtml',
:test_layout => 'sproutcore:lib/index.rhtml',
# name a framework to use as the theme. will be included in required
# frameworks automatically if found.
:theme => 'sproutcore/ace',
# use default bootstrap framework
:bootstrap_inline => 'sproutcore/bootstrap:javascript',
# In design mode, load the designer
:design_required => ['sproutcore/designer'],
# packs all JavaScript and CSS into one file for reduced HTTP requests
:use_packed => true,
# generates output using sprites rather than data urls. This is default
# for all modes: it is faster to generate and browsers handle sprites better
# than data urls.
:use_sprites => true,
# If set to true, the specified framework, if loaded via the SC.loadBundle
# API, will be set up to be lazily instantiated when loaded.
:lazy_instantiation => false,
# if set to true then the index.html will build into the global language
# and target directory. This can interfere with deploying multiple builds
# at one but it is more convenient.
:overwrite_current => false,
# causes the default index.html file to add an overflow:hidden statement
# to the body tag. This is usually preferred since it makes drag and drop
# look nicer
:hide_body_overflow => true,
# A hash of additional MIME types, i.e. { '.m4a' => 'audio/mp4a-latm' }
:mime_types => {},
# Whether to generate an manifest.appcache file for HTML5 application caching
:html5_manifest => false,
# Which networks/URLs to allow if HTML5 application caching is turned on
:html5_manifest_networks => [],
# Default favicon. You can set your own or set it to nil to not use one.
# If one is set, the path will be evaluated via sc_static() in the
# index.rhtml file.
:favicon => 'favicon.ico',
# Whether to include touch icons in the index.html and other touch related
# properties
:touch_enabled => true,
# If touch graphics are enabled (see above), then these are the paths which
# will be used for the various graphics. The paths will be evaluated via
# sc_static() in the index.rhtml file.
#
# Note: If you specify both a precomposed icon and a "regular" icon, the
# precomposed version will be used.
:icon => 'sproutcore-logo.png',
:precomposed_icon => nil,
:startup_image_portrait => 'sproutcore-startup-portrait.png',
:startup_image_landscape => 'sproutcore-startup-landscape.png'
end
mode :debug do
config :all,
# in debug mode, load fixtures, debug, tests, and protocols
:load_fixtures => true,
:load_debug => true,
:load_tests => true,
:load_protocols => true,
# Do not combine javascript and stylesheet
:combine_javascript => false,
:combine_stylesheets => true,
:minify_javascript => false,
:minify_css => false,
:minify_html => false,
# In debug mode, we want to pad sprites for debugging so it is clear
# when the developer messes up their CSS.
:pad_sprites_for_debugging => true,
:build_prefix => 'tmp/debug/build',
:staging_prefix => 'tmp/debug/staging',
# debug settings for sc-server
:serve_exceptions => true,
:reload_project => true,
# In debug mode, we want to simply compute the build number each time
# to ensure the latest version is always loaded.
:build_number => :current,
# Instructs the URL builders to include a timestamp token at the end of
# urls. This option is only useful in development mode since browsers
# will respect the timestamp token as a way to unique the url. This
# should not be used in production as some proxies on the internet do
# not respect tokens.
:timestamp_urls => true,
# Do not pack javascripts in development mode, we want each file to
# load independently.
:use_packed => false,
# Turn off HTML5 application caching by default in debug mode
:html5_manifest => false
end