Commit 453a5dc8da5dc1573989921ec297854bf2631876
1 parent
cc806102
Exists in
minimize
Init sencha cmd project
Showing
33 changed files
with
4397 additions
and
0 deletions
Show diff stats
... | ... | @@ -0,0 +1,503 @@ |
1 | +<?xml version="1.0" encoding="utf-8"?> | |
2 | +<!-- | |
3 | +********************************** DO NOT EDIT ********************************** | |
4 | + | |
5 | +This file will be replaced during upgrades so DO NOT EDIT this file. If you need to | |
6 | +adjust the process, reading and understanding this file is the first step. | |
7 | + | |
8 | +In most cases, the adjustments can be achieved by setting properties or providing one | |
9 | +of the "hooks" in the form of a "-before-" or "-after-" target. Whenever possible, look | |
10 | +for one of these solutions. | |
11 | + | |
12 | +Failing that, you can copy whole targets to your build.xml file and it will overrride | |
13 | +the target provided here. Doing that can create problems for upgrading to newer | |
14 | +versions of Cmd so it is not recommended but it will be easier to manage than editing | |
15 | +this file in most cases. | |
16 | +--> | |
17 | +<project name="app-build-impl"> | |
18 | + <!-- | |
19 | + =============================================================== | |
20 | + helper targets for ant integrations with IDE's | |
21 | + (human readable target names) | |
22 | + =============================================================== | |
23 | + --> | |
24 | + <target name="-before-build-testing"/> | |
25 | + <target name="-build-testing" depends="testing,build"/> | |
26 | + <target name="-after-build-testing"/> | |
27 | + <target name="build-testing" | |
28 | + depends="-before-build-testing, | |
29 | + -build-testing, | |
30 | + -after-build-testing"/> | |
31 | + | |
32 | + <target name="Build - Testing" | |
33 | + description="Create a Testing build of this project" | |
34 | + depends="build-testing"/> | |
35 | + | |
36 | + <target name="-before-build-production"/> | |
37 | + <target name="-build-production" depends="production,build"/> | |
38 | + <target name="-after-build-production"/> | |
39 | + <target name="build-production" | |
40 | + depends="-before-build-production, | |
41 | + -build-production, | |
42 | + -after-build-production"/> | |
43 | + | |
44 | + <target name="Build - Production" | |
45 | + description="Create a Production build of this project" | |
46 | + depends="build-production"/> | |
47 | + | |
48 | + <target name="-before-build-native"/> | |
49 | + <target name="-build-native" depends="native,build"/> | |
50 | + <target name="-after-build-native"/> | |
51 | + <target name="build-native" | |
52 | + depends="-before-build-native, | |
53 | + -build-native, | |
54 | + -after-build-native"/> | |
55 | + | |
56 | + <target name="Build - Native" | |
57 | + description="Create a Native build of this project" | |
58 | + depends="build-native"/> | |
59 | + | |
60 | + <target name="-before-start-local-webserver"/> | |
61 | + <target name="-start-local-webserver" depends="init"> | |
62 | + <x-launch-terminal> | |
63 | + <![CDATA[ | |
64 | + ${cmd.dir}/sencha fs web -port=${build.web.port} start -map=${build.web.root} | |
65 | + ]]> | |
66 | + </x-launch-terminal> | |
67 | + </target> | |
68 | + <target name="-after-start-local-webserver"/> | |
69 | + <target name="start-local-webserver" | |
70 | + depends="-before-start-local-webserver, | |
71 | + -start-local-webserver, | |
72 | + -after-start-local-webserver"/> | |
73 | + | |
74 | + <target name="WebServer - Start Local" | |
75 | + description="Starts a local webserver for this project" | |
76 | + depends="start-local-webserver"/> | |
77 | + | |
78 | + <target name="-before-compass-watch"/> | |
79 | + <target name="-compass-watch" depends="init"> | |
80 | + <x-launch-terminal> | |
81 | + compass watch ${app.sass.dir} | |
82 | + </x-launch-terminal> | |
83 | + </target> | |
84 | + <target name="-after-compass-watch"/> | |
85 | + <target name="compass-watch" | |
86 | + depends="-before-compass-watch, | |
87 | + -compass-watch, | |
88 | + -after-compass-watch"/> | |
89 | + | |
90 | + <target name="Compass - Watch" | |
91 | + description="Opens terminal and watches for SASS updates" | |
92 | + depends="compass-watch"/> | |
93 | + | |
94 | + <!-- | |
95 | + =============================================================== | |
96 | + environment setters | |
97 | + =============================================================== | |
98 | + --> | |
99 | + <target name="production" | |
100 | + description="Sets the build environment to production."> | |
101 | + <property name="build.environment" value="production"/> | |
102 | + </target> | |
103 | + | |
104 | + <target name="testing" | |
105 | + description="Sets the build environment to testing."> | |
106 | + <property name="build.environment" value="testing"/> | |
107 | + </target> | |
108 | + | |
109 | + <target name="native" | |
110 | + description="Sets the build environment to native."> | |
111 | + <property name="build.environment" value="native"/> | |
112 | + </target> | |
113 | + | |
114 | + <target name="package" | |
115 | + description="Sets the build environment to package."> | |
116 | + <property name="build.environment" value="package"/> | |
117 | + </target> | |
118 | + | |
119 | + | |
120 | + <!-- | |
121 | + =============================================================== | |
122 | + Find Cmd | |
123 | + uses targets from find-cmd-impl.xml to detect the current | |
124 | + install of Sencha Cmd | |
125 | + =============================================================== | |
126 | + --> | |
127 | + <import file="${basedir}/.sencha/app/find-cmd-impl.xml"/> | |
128 | + <target name="init-cmd" | |
129 | + depends="find-cmd-in-path, | |
130 | + find-cmd-in-environment, | |
131 | + find-cmd-in-shell"> | |
132 | + <echo>Using Sencha Cmd from ${cmd.dir} for ${ant.file}</echo> | |
133 | + | |
134 | + <!-- | |
135 | + load the sencha.jar ant task definitions. | |
136 | + | |
137 | + NOTE: the 'loaderref' attribute stores this task def's class loader | |
138 | + on the project by that name, so it will be sharable across sub-projects. | |
139 | + This fixes out-of-memory issues, as well as increases performance. | |
140 | + | |
141 | + To supoprt this, it is recommended that any customizations that use | |
142 | + 'ant' or 'antcall' tasks set 'inheritrefs=true' on those tasks, in order | |
143 | + to propagate the senchaloader reference to those subprojects. | |
144 | + | |
145 | + The sencha 'x-ant-call' task, which extends 'antcall' and defaults | |
146 | + 'inheritrefs' to true, may be used in place of antcall in | |
147 | + build process customizations. | |
148 | + --> | |
149 | + <taskdef resource="com/sencha/ant/antlib.xml" | |
150 | + classpath="${cmd.dir}/sencha.jar" | |
151 | + loaderref="senchaloader"/> | |
152 | + | |
153 | + <!-- | |
154 | + Some operations require sencha.jar in the current java classpath, | |
155 | + so this will extend the java.lang.Thread#contextClassLoader with the | |
156 | + specified java classpath entries | |
157 | + --> | |
158 | + <x-extend-classpath> | |
159 | + <jar path="${cmd.dir}/sencha.jar"/> | |
160 | + </x-extend-classpath> | |
161 | + </target> | |
162 | + | |
163 | + <!-- | |
164 | + =============================================================== | |
165 | + Init | |
166 | + uses targets from init-impl.xml to load Sencha Cmd config | |
167 | + system properties and ant task definitions | |
168 | + =============================================================== | |
169 | + --> | |
170 | + <import file="${basedir}/.sencha/app/init-impl.xml"/> | |
171 | + <target name="init" | |
172 | + depends="init-local, | |
173 | + init-cmd, | |
174 | + -before-init, | |
175 | + -init, | |
176 | + -after-init, | |
177 | + -before-init-defaults, | |
178 | + -init-defaults, | |
179 | + -after-init-defaults, | |
180 | + -init-compiler"/> | |
181 | + | |
182 | + <!-- | |
183 | + =============================================================== | |
184 | + Build | |
185 | + this is the starting point for the build process. The 'depends' | |
186 | + attribute on the -build target controls the ordering of the | |
187 | + different build phases | |
188 | + =============================================================== | |
189 | + --> | |
190 | + <target name="-before-build"/> | |
191 | + <target name="-build" | |
192 | + depends="refresh, | |
193 | + resolve, | |
194 | + js, | |
195 | + resources, | |
196 | + sass, | |
197 | + slice, | |
198 | + page, | |
199 | + native-package"/> | |
200 | + <target name="-after-build"/> | |
201 | + <target name="build" | |
202 | + depends="init,-before-build,-build,-after-build" | |
203 | + description="Builds the application"/> | |
204 | + | |
205 | + <!-- | |
206 | + =============================================================== | |
207 | + Clean | |
208 | + removes all artifacts from the output build directories | |
209 | + =============================================================== | |
210 | + --> | |
211 | + <target name="-before-clean"/> | |
212 | + <target name="-clean"> | |
213 | + <delete dir="${build.dir}"/> | |
214 | + <delete dir="${build.temp.dir}"/> | |
215 | + </target> | |
216 | + <target name="-after-clean"/> | |
217 | + <target name="clean" | |
218 | + depends="init" | |
219 | + description="Removes all build output produced by the 'build' target"> | |
220 | + <x-ant-call unless="skip.clean"> | |
221 | + <target name="-before-clean"/> | |
222 | + <target name="-clean"/> | |
223 | + <target name="-after-clean"/> | |
224 | + </x-ant-call> | |
225 | + </target> | |
226 | + | |
227 | + <!-- | |
228 | + =============================================================== | |
229 | + Watch | |
230 | + uses targets from watch-impl.xml to initiate the application | |
231 | + watch process using instrumented state from the compiler | |
232 | + =============================================================== | |
233 | + --> | |
234 | + <import file="${basedir}/.sencha/app/watch-impl.xml"/> | |
235 | + <target name="watch"> | |
236 | + <property name="build.optimize" value=""/> | |
237 | + <x-ant-call> | |
238 | + <target name="-before-watch"/> | |
239 | + <target name="-watch"/> | |
240 | + <target name="-after-watch"/> | |
241 | + </x-ant-call> | |
242 | + </target> | |
243 | + | |
244 | + <!-- | |
245 | + =============================================================== | |
246 | + JS | |
247 | + uses targets from js-impl.xml to produce the output js files | |
248 | + containing needed application and framework js classes | |
249 | + =============================================================== | |
250 | + --> | |
251 | + <import file="${basedir}/.sencha/app/js-impl.xml"/> | |
252 | + <target name="js" | |
253 | + depends="init" | |
254 | + description="Builds the output javascript file(s)"> | |
255 | + <x-ant-call unless="skip.js"> | |
256 | + <target name="-before-js"/> | |
257 | + <target name="-js"/> | |
258 | + <target name="-after-js"/> | |
259 | + </x-ant-call> | |
260 | + </target> | |
261 | + | |
262 | + <!-- | |
263 | + =============================================================== | |
264 | + Sass | |
265 | + uses targets from sass-impl.xml to produce the output css | |
266 | + files for the application's styling | |
267 | + =============================================================== | |
268 | + --> | |
269 | + <import file="${basedir}/.sencha/app/sass-impl.xml"/> | |
270 | + <target name="sass" | |
271 | + depends="init" | |
272 | + description="Builds the Sass files using Compass."> | |
273 | + <x-ant-call unless="skip.sass"> | |
274 | + <target name="-before-sass"/> | |
275 | + <target name="-sass"/> | |
276 | + <target name="-after-sass"/> | |
277 | + </x-ant-call> | |
278 | + </target> | |
279 | + | |
280 | + <!-- | |
281 | + =============================================================== | |
282 | + Resources | |
283 | + uses targets from resources-impl.xml to copy resources from | |
284 | + the application and required packages to the output directory | |
285 | + =============================================================== | |
286 | + --> | |
287 | + <import file="${basedir}/.sencha/app/resources-impl.xml"/> | |
288 | + <target name="resources" | |
289 | + depends="init" | |
290 | + description="Copy resources to build folder."> | |
291 | + <x-ant-call unless="skip.resources"> | |
292 | + <target name="-before-resources"/> | |
293 | + | |
294 | + <!-- Legacy targets: --> | |
295 | + <target name="-before-inherit-resources"/> | |
296 | + <target name="-before-copy-resources"/> | |
297 | + | |
298 | + <target name="-resources"/> | |
299 | + | |
300 | + <!-- Legacy targets: --> | |
301 | + <target name="-after-copy-resources"/> | |
302 | + <target name="-after-inherit-resources"/> | |
303 | + | |
304 | + <target name="-after-resources"/> | |
305 | + </x-ant-call> | |
306 | + </target> | |
307 | + | |
308 | + | |
309 | + <!-- | |
310 | + =============================================================== | |
311 | + Slice | |
312 | + uses targets from slice-impl.xml to extract theme images from | |
313 | + the application for use with older browsers that don't | |
314 | + support modern css features | |
315 | + =============================================================== | |
316 | + --> | |
317 | + <import file="${basedir}/.sencha/app/slice-impl.xml"/> | |
318 | + <target name="slice" | |
319 | + depends="init" | |
320 | + description="Slices CSS3 theme to produce non-CSS3 images and sprites."> | |
321 | + <x-ant-call unless="skip.slice"> | |
322 | + <target name="-before-slice"/> | |
323 | + <target name="-slice"/> | |
324 | + <target name="-after-slice"/> | |
325 | + </x-ant-call> | |
326 | + </target> | |
327 | + | |
328 | + <!-- | |
329 | + Theme - this is a legacy support target for extjs 4.1 apps. It redirects | |
330 | + to the "slice" ant target | |
331 | + --> | |
332 | + <target name="theme" | |
333 | + depends="init" | |
334 | + description="Builds the application's theme(s) images using the slicer (Ext JS 4.1 only)."> | |
335 | + <x-ant-call unless="skip.theme"> | |
336 | + <target name="-before-theme"/> | |
337 | + <target name="slice"/> | |
338 | + <target name="-after-theme"/> | |
339 | + </x-ant-call> | |
340 | + </target> | |
341 | + | |
342 | + <!-- | |
343 | + Refresh Theme - uses targets from refresh-impl.xml to rebuild the current | |
344 | + theme | |
345 | + --> | |
346 | + <target name="refresh-theme" | |
347 | + depends="init" | |
348 | + description="Rebuilds the currently enabled app theme (Ext JS 4.1 only)."> | |
349 | + <x-ant-call unless="skip.theme"> | |
350 | + <target name="-before-refresh-theme"/> | |
351 | + <target name="-refresh-theme"/> | |
352 | + <target name="-after-refresh-theme"/> | |
353 | + </x-ant-call> | |
354 | + </target> | |
355 | + | |
356 | + <!-- | |
357 | + =============================================================== | |
358 | + Refresh | |
359 | + uses targets from refresh-impl.xml to generate bootstrapping | |
360 | + information for the application | |
361 | + =============================================================== | |
362 | + --> | |
363 | + <import file="${basedir}/.sencha/app/refresh-impl.xml"/> | |
364 | + <target name="refresh" | |
365 | + depends="init" | |
366 | + description="Refreshes the application bootstrap data."> | |
367 | + <x-ant-call unless="skip.refresh"> | |
368 | + <target name="-before-refresh"/> | |
369 | + <target name="-refresh"/> | |
370 | + <target name="-after-refresh"/> | |
371 | + </x-ant-call> | |
372 | + </target> | |
373 | + | |
374 | + <!-- | |
375 | + =============================================================== | |
376 | + Page | |
377 | + uses targets from page-impl.xml to generate the output markup | |
378 | + file and associated microloader / app manifest | |
379 | + =============================================================== | |
380 | + --> | |
381 | + <import file="${basedir}/.sencha/app/page-impl.xml"/> | |
382 | + <target name="page" | |
383 | + depends="init" | |
384 | + description="Builds the application's HTML page."> | |
385 | + <x-ant-call unless="skip.page"> | |
386 | + <target name="-before-page"/> | |
387 | + <target name="-page"/> | |
388 | + <target name="-after-page"/> | |
389 | + </x-ant-call> | |
390 | + </target> | |
391 | + | |
392 | + <!-- | |
393 | + =============================================================== | |
394 | + Resolve | |
395 | + uses targets from resolve-impl.xml to detect dynamic app | |
396 | + dependencies using phantomjs | |
397 | + =============================================================== | |
398 | + --> | |
399 | + <import file="${basedir}/.sencha/app/resolve-impl.xml"/> | |
400 | + <target name="resolve" | |
401 | + depends="init" | |
402 | + description="Resolve application dependencies dynamically."> | |
403 | + <x-ant-call unless="skip.resolve"> | |
404 | + <target name="-before-resolve"/> | |
405 | + <target name="-resolve"/> | |
406 | + <target name="-after-resolve"/> | |
407 | + </x-ant-call> | |
408 | + </target> | |
409 | + | |
410 | + <!-- | |
411 | + =============================================================== | |
412 | + Native Package | |
413 | + uses targets from packager-impl.xml to run native packager | |
414 | + applications to produce stand-alone installable web apps from | |
415 | + this built Cmd application | |
416 | + =============================================================== | |
417 | + --> | |
418 | + <import file="${basedir}/.sencha/app/packager-impl.xml"/> | |
419 | + <target name="native-package" | |
420 | + depends="init" | |
421 | + description="Builds native packages of the application"> | |
422 | + <x-ant-call unless="skip.native-package"> | |
423 | + <target name="-before-native-package"/> | |
424 | + <target name="-native-package"/> | |
425 | + <target name="-after-native-package"/> | |
426 | + </x-ant-call> | |
427 | + </target> | |
428 | + | |
429 | + <!-- | |
430 | + =============================================================== | |
431 | + Help - properties | |
432 | + displays all current ant properties | |
433 | + =============================================================== | |
434 | + --> | |
435 | + <target name=".props" depends="init" | |
436 | + description="Lists all properties defined for the build"> | |
437 | + <echoproperties/> | |
438 | + </target> | |
439 | + | |
440 | + <!-- | |
441 | + =============================================================== | |
442 | + Help - docs | |
443 | + displays the help message | |
444 | + =============================================================== | |
445 | + --> | |
446 | + <target name=".help" depends="init" | |
447 | + description="Provides help on the build script"> | |
448 | + <x-get-project-targets property="help.message"/> | |
449 | + | |
450 | + <echo><![CDATA[${help.message} | |
451 | +This is the main build script for your application. | |
452 | + | |
453 | +The following properties can be used to disable certain steps in the build | |
454 | +process. | |
455 | + | |
456 | + * skip.page Do not build the HTML page. | |
457 | + * skip.js Do not build the output js code file(s) | |
458 | + * skip.resources Do not copy resources to the build directory | |
459 | + * skip.sass Do not build the SASS. | |
460 | + * skip.slice Do not build the theme image slicer. | |
461 | + * skip.theme Do not build the theme images. | |
462 | + | |
463 | +The following properties can be used to modify the build process. | |
464 | + | |
465 | + * build.compression.yui Specify yui compression for the build | |
466 | + | |
467 | + * build.compression.closure Specify closure compression for the build | |
468 | + | |
469 | + * build.compression.uglify Specify uglify compression for the build | |
470 | + | |
471 | + * build.options Set general options for the build | |
472 | + (eg: enable a debug build) | |
473 | + | |
474 | + To modify any of the previous build specific options, see: | |
475 | + ${basedir}/.sencha/app/${build.environment}.properties | |
476 | + | |
477 | + * build.operations Insert commands into the compile command | |
478 | + for the build. | |
479 | + | |
480 | + * app.page.name Set the input and output page file | |
481 | + for the compile command. | |
482 | + | |
483 | + * build.classes.name Specify the compiled js file | |
484 | + | |
485 | + | |
486 | +For details about how these options affect your build, see | |
487 | + | |
488 | + ${basedir}/.sencha/app/build-impl.xml | |
489 | + | |
490 | +These options can be stored in a local.properties file in this folder or in the | |
491 | +local.properties file in the workspace. | |
492 | + | |
493 | +Alternatively, these can be supplied on the command line. For example: | |
494 | + | |
495 | + ant -Dskip.sass=1 build | |
496 | + | |
497 | +To see all currently defined properties, do this: | |
498 | + | |
499 | + ant .props | |
500 | + ]]></echo> | |
501 | + </target> | |
502 | + | |
503 | +</project> | |
... | ... |
... | ... | @@ -0,0 +1,20 @@ |
1 | +# ============================================================================= | |
2 | +# This file provides an override point for default variables defined in these | |
3 | +# lower priority files: | |
4 | +# | |
5 | +# - ext.properties | |
6 | +# - *.defaults.properties | |
7 | +# - defaults.properties | |
8 | +# | |
9 | +# To override a property based on build.environment instead add properties to | |
10 | +# one of these higher priority files: | |
11 | +# | |
12 | +# - production.properties | |
13 | +# - testing.properties | |
14 | +# - native.properties | |
15 | +# - package.properties | |
16 | +# | |
17 | +# IMPORTANT - Sencha Cmd will merge your changes with its own during upgrades. | |
18 | +# To avoid potential merge conflicts avoid making large, sweeping changes to | |
19 | +# this file. | |
20 | +# ============================================================================= | |
... | ... |
... | ... | @@ -0,0 +1,340 @@ |
1 | +{ | |
2 | + "sources": { | |
3 | + "build.properties.merge": { | |
4 | + "d4613dc19be3ddb60e7ff5716e28c8b15d954f3a": "eJytUstOw0AMvPMVI/WGoB+AxAFx4sBD0B9ws05idbOOdp2E/j1OH6pEEKfuzR57POP1Co/XfDcrbFopqCUy+qyjBC6gBB05Zw/QqyRDrRmBaxqiYaQstI1e5xlJHCAJ1nJhZ4s6cXYm0Sy2P/CWh5uVI8A9+NvWPqXnbMLllLxdn5jLEvsTmUXrRSHhBO6xpeJyNGE7SAxrTqNkTR27A0nFmAIoBFzIYOpsmhhaHz2glab9x4L3hqEy0bRUa1xMUrMEEpmMvMz3VO2o4d/uXl4/3j83T28bL/niVLWE5y5gkhjRcW4Yex0yPJ8a9zCJtRAr0CkhDNklYOibTP6X6+OyaFRx32q+CqEzS6WpjlJ55xHvaDf3RnLwDmVi7uf4POewKzufy8x83Vv8AQy16fs\u003d" | |
5 | + }, | |
6 | + "sencha.cfg.tpl.merge": { | |
7 | + "8b88dc946a59c6ad6edb77744966e548250b33a3": "eJytVE1vEzEQvedXjASHVmo3vSEhwgFuHKASHLk43tmNU6+9sr35oMp/542dbDZN4QKRktge+703n2/ox4rJqY7JN5SwVn1vjVbJeDfDuhLb4ll+D7PZm6vrTcBm68MTDZFrWu5fgtAN7xLNKflBr24z5Phm8Twuv04JepVWN/EWby6Q1mqjog6mTxT9EDRHutG+6xRF7lVQietCoK2KUUAWb38ODw/vPslhbcJhjsXdK2fVOgr3tyH1QyLrj4SNDxcCloOxNamQTKN0ipkrnwnQiUu8Abnms+kwn3BehDJ4n3I88wtxGGGk7YoddbhsXEtRx0iBTx7jyjpS9pAjUIzLEY/Yz2PQpFxdNhsVCNyskw+Gi1gxVCPdJK2PCJZAywUKg2WquTHOlDAYC2LtA1T03tWiCne/IB3fSzqOcqozCaS8moCTzitSyDVq+e/EwPkzMYxXxM3gdGaTyHVmZ468E0xOf3EGxrmytpI8TcFR9kEhlmiJ4gfOjNN2qBn/2EjaWnacC7do0d41pq3C8g5AH8Aj9fGx8Iw22hpracknNFTkkHyHEtXQsSfTUI+AsUvZpdrnOnFSaIzLYMbb2LM2jeG6gm10VNRmT19rdZTMk2pZRCaFFEkycIwv7uQqlX45tn8OXjYtEIj7vLrP2TK6gJsImb7nkPaklRNRna+zJtGoV8q1GR1+SleKL740aC8yJKgEpDx3jl2AadDLcZ4Krq4wfNr3MNa8q1Tsd3fH9Tr2VFUVlXEhcGXOFesqdVY0nrlHwvN92V0VxGQ/gh4K1NTdU/AjKXoxwMiamCTikoY4iTVALoaA9v2ejlVU5tKp2fdZ5OlylYGulI5YULf4rx8I/TxEFCQ9Fn/Fz3t6tDLgdLaYX3meRuTc+m0JjjUuzz+18QZ9yKFlIEnRY/ymiKJHWznecqANhyjPZ78BlO9Yig\u003d\u003d" | |
8 | + }, | |
9 | + "production.properties.merge": { | |
10 | + "cbdf9712e9b5d37cecb4d0530ba1fccd0ed004a3": "eJytkUEOwjAMBO+8YkXv/QF/4MAHAnGpRbArxy3i97gFQbk3t6ycmbXS4LDl2TU49VzRcSEMphNnqkgCncgsLhiUxdGpIVOXxuKYknE6l5iLhIUyWBCgeJ7Hi7NK+xmtbWQDmTPVNkRUF8knQTKCSnmC74OaB+jRk+A8csks10DOWu8J+x97D5KJTeVO4u2uianjD7lq5N+9PN1mL6uxP5fN3o5Vuwh87hO0pVHRlAMz+//cy7sa2o2/4QV6LJW9" | |
11 | + }, | |
12 | + "native.properties.merge": { | |
13 | + "2c8c063f9588eecff09624782d7369a8a000d61c": "eJytkEsOwjAMRPecYkT3vQF3YMEFguJSi2BXjgni9rgfFQ5AdrEm743T4fTPc+hwGbli4EKYTBtnqkgCbWQWF0zK4hjUkGlIz+JoyThdS+RiwkIZLAiQJOdG/RarfeAmMmeqfUioLoJtgmQElfIGPyY1D8hrJMH1ySWz3AI3K30kHFfuESSNTeVB4v2hi8T5i/tp4vs+nu6zk9XY38tGK/+nWQx87hK0pU3RlAMzu3fv8qaG8s9f/wFV3ZB9" | |
14 | + }, | |
15 | + "testing.properties.merge": { | |
16 | + "360e715956c81757e53736789fe20be045acb544": "eJytkMENwjAMRe+d4oveuwE7cGCBoLjUItiVY4q6PW6pKAM0t1g/732nxfnI07S4DlzRcyGMphNnqkgCncgsLhiVxdGrIVOfXsUxJeN0K5GLCQtlsCBATtVZ7t2Wq13wRjJnql1YqK6GbYJkBJUyg5+jmgflPZDg9uKSgxK8xekD4bSBTyCZ2FSeJN41bUQuO++vi/828vRYpKzGPq87fQV/1WLgS5mgrXWKphyYRb6L10c1nAf//gdqIpHi" | |
17 | + }, | |
18 | + "package.properties.merge": { | |
19 | + "c6c1fb2fb1dda28480ad0f6e5caffc9b97d196ae": "eJytkUFygzAMRfc5hSZsOxygM11223aRCwgsQBNH8tiCTG5fGWjDAcLOsnjvS27g45XfqYHLxAUGjgQp68KBCqCALpSzHyApi8GgGQINOEeDBTNjF73PKywUgAUclLC/4kjt3lda5yXKxlRat1BZDXsFMBOoxAfwLWk2p9wnEuhmjoFldF512kRw3sFnIFk4q9xIrD013vLz5B2y2P9EhtcqZc1sj3WmTXCI5gWrYZy2xomKwTFV/hSvP5XN+fV9+Xzftjb7SDoc+jClWJmmIGi80N9SwnbVe1HlDUTdWfNvt1togpGEMkYoLP1K7tVfIHKXfeVU/S9+/V9rlbyW" | |
20 | + }, | |
21 | + "theme.html.tpl.merge": { | |
22 | + "79e5bc8b4cebd921ec602e9a67c0493c70d2d5ce": "eJydVFFv0zAQfs+vuPkJEE66wQPqkr6UIUBITLQ88Ogm18arEwffNW017b/PTsLWjSKmWlGi+LvvvvPns9Ozj9+n81/XV1ByZSZReiZlBABT2+ydXpUMr/LXcDE6v5D+9S6GGdZ5qeBLnceRlJ4w8EpUxSQwIWXNBidXO4avM5iXWCF8Vq5GojTpsT6uQlZelhuJvze6zcTU1ow1y/m+QQF5/5cJxh0nQeYSvLQj5Ozn/JP8ICZRn2ioGb5ZVYAyBlxI6LAAo+s1gaoLoNzphqmLC3V3xAD7YJMJ4r1BKhFZAHv5QTUnElA6XGYCd6pqDMbdVDIk6LMeMm5Uq/pZAeTyTMRx4p/bpVMVbq1bXysu7xIfKgts4xsSkzTpCS/PubCWiZ1qnvGP2MElwszoHJ031OFxH14g6bAu0P1fL9hfqVovkXhwvrSO880JmoN1jcrXaoX0A82jeRz6Si4UYUKKKBm2J/mjfaKzp0g+LPBEzXxDbKuj1nZt2WcKI97qYoUsw9FQuvZ7evuAhVEpt9L1GM5Hze7yCeKJXI7h/egvpLGkWVvP8gdBsW7xKW5bdEtjt2NoNemFOYDvosfKdpK6LpPsa0B++08E3jwr2nqzNe991YeZu+Unw/rT5OB6Wdhi743qPgHp7p972o53iQ\u003d\u003d" | |
23 | + }, | |
24 | + "config.rb.tpl.merge": { | |
25 | + "33f446bd02c3fd24eb27891582eff6a2e789796b": "eJxLLi2KT8ksUrBVcMvMSdUDMvMSc1M14uPdPH1c4+M1ufJLSwpKS+KLSypzUoGqrPJSi0tSU7gALskTcA\u003d\u003d" | |
26 | + }, | |
27 | + "app.json.tpl.merge": { | |
28 | + "5c35fa135e5c429faf9348c096b567a3079ad83b": "eJyr5lIAAqW8xNxUJSsFpWoQo1ZJhwsiXJRaWJpZlFoMlIoGi8TCZDJTwMpL8zILS1M9U2qVuGoByK4TZA\u003d\u003d" | |
29 | + }, | |
30 | + "app.js.tpl.merge": { | |
31 | + "adb7999f937a224ece5dc57252db7048652e6616": "eJxNj81uwjAQhO9+irnxIxTu9FQhrlxaVeK4iYfEUmJHzroBId69xkiFPXhH3v1m7O3aINd35yacXU/k3tIzitJCvEUabdH1FV/0TSfYD7bCKSQ04kHrFPqPy1T8PGkzcw4R15AiZBx714i64Deo04PgxAJPmF3fo5NfQgNqYmBsS2CxeoVi7ujze9oo1vm2MuutMYeLVm/uy9szXwbusLjlyTHL+2Jjyj0vSm/fJ9XnC85bj6VySNKwj8xf/3GcxxB1B42J5r76MH/syWTb" | |
32 | + }, | |
33 | + "index.html.tpl.merge": { | |
34 | + "f036c68a34ae0bc941832df08c406a00545dd9f6": "eJx9kT0PwiAQhnd/BbIjqwPt4kccNHaogyPSM1SpNHDRGuN/F4tRa1SWC/fe8x53iP54OcrX2YTM8sU87QmNlbkHkEXaI+GIClASpaXzgAld5VM2pA8JSzSQXg6ygqvg8RaVPmNENEzZqi5DkjAWhXdxYy16dLLuym2JKQ974sAk1OPZgNcASIl2sE3okxso7+kH6JUrayTeqYReti687GTdPpOorxwaZAUcB7tACR4r/+CvPt+BOAf/OUjHTNbfbJ4WnUUJHtcvNrY4B6IN92z7NzfHY30y" | |
35 | + }, | |
36 | + "{controllerFileName}.js.tpl.merge": { | |
37 | + "b092f4aad11d2f7eaab5ce3e2dcc2fc3134f3188": "eJxzrSjRS0lNy8xL1VCvTs7PKynKz8lJLfJLzE0tLkhMTq3VQxOtVddRqOZSAILUipLUvBQrBXVXoBmJBQV6znCF6ly1mtZcACwSIF0\u003d" | |
38 | + } | |
39 | + }, | |
40 | + "targets": { | |
41 | + ".sencha/app/build.properties": { | |
42 | + "source": "build.properties.merge", | |
43 | + "version": "d4613dc19be3ddb60e7ff5716e28c8b15d954f3a", | |
44 | + "parameters": { | |
45 | + "viewNamespace": "amdaApp.view", | |
46 | + "frameworkName": "ext", | |
47 | + "appName": "amdaApp", | |
48 | + "controllerNamespace": "amdaApp.controller", | |
49 | + "frameworkPath": "ext", | |
50 | + "packagesRelPath": "ext/packages", | |
51 | + "appModels": "", | |
52 | + "themeName": "default", | |
53 | + "library": "all", | |
54 | + "viewName": "Main", | |
55 | + "viewFileName": "Main", | |
56 | + "senchadir": ".sencha", | |
57 | + "controllerName": "Main", | |
58 | + "appStores": "", | |
59 | + "name": "amdaApp", | |
60 | + "appViews": "", | |
61 | + "appControllers": "", | |
62 | + "controllerFileName": "Main", | |
63 | + "modelNamespace": "amdaApp.model", | |
64 | + "uniqueId": "b85c0816-e68e-4737-a78e-2bf642f76ff7" | |
65 | + } | |
66 | + }, | |
67 | + ".sencha/app/sencha.cfg": { | |
68 | + "source": "sencha.cfg.tpl.merge", | |
69 | + "version": "8b88dc946a59c6ad6edb77744966e548250b33a3", | |
70 | + "parameters": { | |
71 | + "viewNamespace": "amdaApp.view", | |
72 | + "frameworkName": "ext", | |
73 | + "appName": "amdaApp", | |
74 | + "controllerNamespace": "amdaApp.controller", | |
75 | + "frameworkPath": "ext", | |
76 | + "packagesRelPath": "ext/packages", | |
77 | + "appModels": "", | |
78 | + "themeName": "default", | |
79 | + "library": "all", | |
80 | + "viewName": "Main", | |
81 | + "viewFileName": "Main", | |
82 | + "senchadir": ".sencha", | |
83 | + "controllerName": "Main", | |
84 | + "appStores": "", | |
85 | + "name": "amdaApp", | |
86 | + "appViews": "", | |
87 | + "appControllers": "", | |
88 | + "controllerFileName": "Main", | |
89 | + "modelNamespace": "amdaApp.model", | |
90 | + "uniqueId": "b85c0816-e68e-4737-a78e-2bf642f76ff7" | |
91 | + } | |
92 | + }, | |
93 | + ".sencha/app/production.properties": { | |
94 | + "source": "production.properties.merge", | |
95 | + "version": "cbdf9712e9b5d37cecb4d0530ba1fccd0ed004a3", | |
96 | + "parameters": { | |
97 | + "viewNamespace": "amdaApp.view", | |
98 | + "frameworkName": "ext", | |
99 | + "appName": "amdaApp", | |
100 | + "controllerNamespace": "amdaApp.controller", | |
101 | + "frameworkPath": "ext", | |
102 | + "packagesRelPath": "ext/packages", | |
103 | + "appModels": "", | |
104 | + "themeName": "default", | |
105 | + "library": "all", | |
106 | + "viewName": "Main", | |
107 | + "viewFileName": "Main", | |
108 | + "senchadir": ".sencha", | |
109 | + "controllerName": "Main", | |
110 | + "appStores": "", | |
111 | + "name": "amdaApp", | |
112 | + "appViews": "", | |
113 | + "appControllers": "", | |
114 | + "controllerFileName": "Main", | |
115 | + "modelNamespace": "amdaApp.model", | |
116 | + "uniqueId": "b85c0816-e68e-4737-a78e-2bf642f76ff7" | |
117 | + } | |
118 | + }, | |
119 | + ".sencha/app/native.properties": { | |
120 | + "source": "native.properties.merge", | |
121 | + "version": "2c8c063f9588eecff09624782d7369a8a000d61c", | |
122 | + "parameters": { | |
123 | + "viewNamespace": "amdaApp.view", | |
124 | + "frameworkName": "ext", | |
125 | + "appName": "amdaApp", | |
126 | + "controllerNamespace": "amdaApp.controller", | |
127 | + "frameworkPath": "ext", | |
128 | + "packagesRelPath": "ext/packages", | |
129 | + "appModels": "", | |
130 | + "themeName": "default", | |
131 | + "library": "all", | |
132 | + "viewName": "Main", | |
133 | + "viewFileName": "Main", | |
134 | + "senchadir": ".sencha", | |
135 | + "controllerName": "Main", | |
136 | + "appStores": "", | |
137 | + "name": "amdaApp", | |
138 | + "appViews": "", | |
139 | + "appControllers": "", | |
140 | + "controllerFileName": "Main", | |
141 | + "modelNamespace": "amdaApp.model", | |
142 | + "uniqueId": "b85c0816-e68e-4737-a78e-2bf642f76ff7" | |
143 | + } | |
144 | + }, | |
145 | + ".sencha/app/testing.properties": { | |
146 | + "source": "testing.properties.merge", | |
147 | + "version": "360e715956c81757e53736789fe20be045acb544", | |
148 | + "parameters": { | |
149 | + "viewNamespace": "amdaApp.view", | |
150 | + "frameworkName": "ext", | |
151 | + "appName": "amdaApp", | |
152 | + "controllerNamespace": "amdaApp.controller", | |
153 | + "frameworkPath": "ext", | |
154 | + "packagesRelPath": "ext/packages", | |
155 | + "appModels": "", | |
156 | + "themeName": "default", | |
157 | + "library": "all", | |
158 | + "viewName": "Main", | |
159 | + "viewFileName": "Main", | |
160 | + "senchadir": ".sencha", | |
161 | + "controllerName": "Main", | |
162 | + "appStores": "", | |
163 | + "name": "amdaApp", | |
164 | + "appViews": "", | |
165 | + "appControllers": "", | |
166 | + "controllerFileName": "Main", | |
167 | + "modelNamespace": "amdaApp.model", | |
168 | + "uniqueId": "b85c0816-e68e-4737-a78e-2bf642f76ff7" | |
169 | + } | |
170 | + }, | |
171 | + ".sencha/app/package.properties": { | |
172 | + "source": "package.properties.merge", | |
173 | + "version": "c6c1fb2fb1dda28480ad0f6e5caffc9b97d196ae", | |
174 | + "parameters": { | |
175 | + "viewNamespace": "amdaApp.view", | |
176 | + "frameworkName": "ext", | |
177 | + "appName": "amdaApp", | |
178 | + "controllerNamespace": "amdaApp.controller", | |
179 | + "frameworkPath": "ext", | |
180 | + "packagesRelPath": "ext/packages", | |
181 | + "appModels": "", | |
182 | + "themeName": "default", | |
183 | + "library": "all", | |
184 | + "viewName": "Main", | |
185 | + "viewFileName": "Main", | |
186 | + "senchadir": ".sencha", | |
187 | + "controllerName": "Main", | |
188 | + "appStores": "", | |
189 | + "name": "amdaApp", | |
190 | + "appViews": "", | |
191 | + "appControllers": "", | |
192 | + "controllerFileName": "Main", | |
193 | + "modelNamespace": "amdaApp.model", | |
194 | + "uniqueId": "b85c0816-e68e-4737-a78e-2bf642f76ff7" | |
195 | + } | |
196 | + }, | |
197 | + "sass/example/theme.html": { | |
198 | + "source": "theme.html.tpl.merge", | |
199 | + "version": "79e5bc8b4cebd921ec602e9a67c0493c70d2d5ce", | |
200 | + "parameters": { | |
201 | + "viewNamespace": "amdaApp.view", | |
202 | + "frameworkName": "ext", | |
203 | + "appName": "amdaApp", | |
204 | + "controllerNamespace": "amdaApp.controller", | |
205 | + "frameworkPath": "ext", | |
206 | + "packagesRelPath": "ext/packages", | |
207 | + "appModels": "", | |
208 | + "themeName": "default", | |
209 | + "library": "all", | |
210 | + "viewName": "Main", | |
211 | + "viewFileName": "Main", | |
212 | + "senchadir": ".sencha", | |
213 | + "controllerName": "Main", | |
214 | + "appStores": "", | |
215 | + "name": "amdaApp", | |
216 | + "appViews": "", | |
217 | + "appControllers": "", | |
218 | + "controllerFileName": "Main", | |
219 | + "modelNamespace": "amdaApp.model", | |
220 | + "uniqueId": "b85c0816-e68e-4737-a78e-2bf642f76ff7" | |
221 | + } | |
222 | + }, | |
223 | + "sass/config.rb": { | |
224 | + "source": "config.rb.tpl.merge", | |
225 | + "version": "33f446bd02c3fd24eb27891582eff6a2e789796b", | |
226 | + "parameters": { | |
227 | + "viewNamespace": "amdaApp.view", | |
228 | + "frameworkName": "ext", | |
229 | + "appName": "amdaApp", | |
230 | + "controllerNamespace": "amdaApp.controller", | |
231 | + "frameworkPath": "ext", | |
232 | + "packagesRelPath": "ext/packages", | |
233 | + "appModels": "", | |
234 | + "themeName": "default", | |
235 | + "library": "all", | |
236 | + "viewName": "Main", | |
237 | + "viewFileName": "Main", | |
238 | + "senchadir": ".sencha", | |
239 | + "controllerName": "Main", | |
240 | + "appStores": "", | |
241 | + "name": "amdaApp", | |
242 | + "appViews": "", | |
243 | + "appControllers": "", | |
244 | + "controllerFileName": "Main", | |
245 | + "modelNamespace": "amdaApp.model", | |
246 | + "uniqueId": "b85c0816-e68e-4737-a78e-2bf642f76ff7" | |
247 | + } | |
248 | + }, | |
249 | + "app.json": { | |
250 | + "source": "app.json.tpl.merge", | |
251 | + "version": "5c35fa135e5c429faf9348c096b567a3079ad83b", | |
252 | + "parameters": { | |
253 | + "viewNamespace": "amdaApp.view", | |
254 | + "frameworkName": "ext", | |
255 | + "appName": "amdaApp", | |
256 | + "controllerNamespace": "amdaApp.controller", | |
257 | + "frameworkPath": "ext", | |
258 | + "packagesRelPath": "ext/packages", | |
259 | + "appModels": "", | |
260 | + "themeName": "default", | |
261 | + "library": "all", | |
262 | + "viewName": "Main", | |
263 | + "viewFileName": "Main", | |
264 | + "senchadir": ".sencha", | |
265 | + "controllerName": "Main", | |
266 | + "appStores": "", | |
267 | + "name": "amdaApp", | |
268 | + "appViews": "", | |
269 | + "appControllers": "", | |
270 | + "controllerFileName": "Main", | |
271 | + "modelNamespace": "amdaApp.model", | |
272 | + "uniqueId": "b85c0816-e68e-4737-a78e-2bf642f76ff7" | |
273 | + } | |
274 | + }, | |
275 | + "app.js": { | |
276 | + "source": "app.js.tpl.merge", | |
277 | + "version": "adb7999f937a224ece5dc57252db7048652e6616", | |
278 | + "parameters": { | |
279 | + "viewNamespace": "amdaApp.view", | |
280 | + "frameworkName": "ext", | |
281 | + "appName": "amdaApp", | |
282 | + "controllerNamespace": "amdaApp.controller", | |
283 | + "frameworkPath": "ext", | |
284 | + "packagesRelPath": "ext/packages", | |
285 | + "appModels": "", | |
286 | + "themeName": "default", | |
287 | + "library": "all", | |
288 | + "viewName": "Main", | |
289 | + "viewFileName": "Main", | |
290 | + "senchadir": ".sencha", | |
291 | + "controllerName": "Main", | |
292 | + "appStores": "", | |
293 | + "name": "amdaApp", | |
294 | + "appViews": "", | |
295 | + "appControllers": "", | |
296 | + "controllerFileName": "Main", | |
297 | + "modelNamespace": "amdaApp.model", | |
298 | + "uniqueId": "b85c0816-e68e-4737-a78e-2bf642f76ff7" | |
299 | + } | |
300 | + }, | |
301 | + "index.html": { | |
302 | + "source": "index.html.tpl.merge", | |
303 | + "version": "f036c68a34ae0bc941832df08c406a00545dd9f6", | |
304 | + "parameters": { | |
305 | + "viewNamespace": "amdaApp.view", | |
306 | + "frameworkName": "ext", | |
307 | + "appName": "amdaApp", | |
308 | + "controllerNamespace": "amdaApp.controller", | |
309 | + "frameworkPath": "ext", | |
310 | + "packagesRelPath": "ext/packages", | |
311 | + "appModels": "", | |
312 | + "themeName": "default", | |
313 | + "library": "all", | |
314 | + "viewName": "Main", | |
315 | + "viewFileName": "Main", | |
316 | + "senchadir": ".sencha", | |
317 | + "controllerName": "Main", | |
318 | + "appStores": "", | |
319 | + "name": "amdaApp", | |
320 | + "appViews": "", | |
321 | + "appControllers": "", | |
322 | + "controllerFileName": "Main", | |
323 | + "modelNamespace": "amdaApp.model", | |
324 | + "uniqueId": "b85c0816-e68e-4737-a78e-2bf642f76ff7" | |
325 | + } | |
326 | + }, | |
327 | + "app/controller/Main.js": { | |
328 | + "source": "{controllerFileName}.js.tpl.merge", | |
329 | + "version": "b092f4aad11d2f7eaab5ce3e2dcc2fc3134f3188", | |
330 | + "parameters": { | |
331 | + "library": "all", | |
332 | + "appName": "amdaApp", | |
333 | + "controllerName": "Main", | |
334 | + "name": "amdaApp", | |
335 | + "controllerNamespace": "amdaApp.controller", | |
336 | + "controllerFileName": "Main" | |
337 | + } | |
338 | + } | |
339 | + } | |
340 | +} | |
0 | 341 | \ No newline at end of file |
... | ... |
... | ... | @@ -0,0 +1,592 @@ |
1 | +# ============================================================================= | |
2 | +# This file defines properties used by build-impl.xml and the associated | |
3 | +# *-impl.xml files (sass-impl.xml, js-impl.xml, etc.), which are the core of | |
4 | +# the applications build process. | |
5 | +# | |
6 | +# This file represents the lowest priority file for defining these properties | |
7 | +# as well as the place to look for documentation and learning what properties | |
8 | +# exist. | |
9 | +# | |
10 | +# The full set of these files is as follows (in priority order): | |
11 | +# | |
12 | +# - One of these (based on build.environment): | |
13 | +# - production.properties | |
14 | +# - testing.properties | |
15 | +# - native.properties | |
16 | +# - package.properties | |
17 | +# | |
18 | +# - build.properties | |
19 | +# | |
20 | +# - One of these (based on app.framework): | |
21 | +# - ext.properties | |
22 | +# - touch.properties | |
23 | +# | |
24 | +# - One of these (based on build.environment): | |
25 | +# - production.defaults.properties | |
26 | +# - testing.defaults.properties | |
27 | +# - native.defaults.properties | |
28 | +# - package.defaults.properties | |
29 | +# | |
30 | +# - defaults.properties | |
31 | +# | |
32 | +# Properties are controlled by the first file in the above list to define the | |
33 | +# value. Values from all levels, however, can reference each other via the | |
34 | +# property expansion. | |
35 | +# | |
36 | +# IMPORTANT - This file should not be modified by an app as it is overwritten | |
37 | +# during each app upgrade. | |
38 | +# ============================================================================= | |
39 | + | |
40 | +# ***************************************************************************** | |
41 | +# Global Build Properties | |
42 | +# these are cross-concern properties used by many build phases | |
43 | +# ***************************************************************************** | |
44 | + | |
45 | +# the default build enviornment type (production, testing, native, package) | |
46 | +# NOTE: this is only a default and will typically be set before this file is | |
47 | +# loaded, typically by the 'sencha app build" command. | |
48 | +# See "sencha help app build" for details. | |
49 | +# | |
50 | +# The corresponding properies files: | |
51 | +# (production.properties, testing.properties, etc.) provide examples of | |
52 | +# overriding sets of properties depending on the selected environment | |
53 | +# NOTE: this replaces the deprecated args.environment | |
54 | +build.environment=production | |
55 | + | |
56 | +# the directory to place built application files | |
57 | +build.dir=${workspace.build.dir}/${build.environment}/${app.name} | |
58 | + | |
59 | +# a temporary output directory used for staging intermediate build artifacts | |
60 | +build.temp.dir=${workspace.build.dir}/temp/${build.environment}/${app.name} | |
61 | + | |
62 | +# the directory under the output folder for placing resources | |
63 | +build.resources.dir=${build.dir}/resources | |
64 | + | |
65 | +# ***************************************************************************** | |
66 | +# JS | |
67 | +# these properties control various aspects of output js code construction | |
68 | +# ***************************************************************************** | |
69 | + | |
70 | +# the output js file that contains all needed js code | |
71 | +build.classes.name=app.js | |
72 | +build.classes.file=${build.dir}/${build.classes.name} | |
73 | + | |
74 | +# the output js file for framework code, if the framework | |
75 | +# classes are not included in the default all-classes.js file | |
76 | +build.framework.name=framework.js | |
77 | +build.framework.file=${build.dir}/${build.framework.name} | |
78 | + | |
79 | +# Don't use these - they are deprecated | |
80 | +build.options.debug.enable=debug:true | |
81 | +build.options.debug.disable=debug:false | |
82 | +build.options.logger.enable=logger:yes | |
83 | +build.options.logger.disable=logger:no | |
84 | + | |
85 | +# This property enables/disables <feature logger> blocks in js output, see build.options | |
86 | +build.options.logger=no | |
87 | + | |
88 | +# This property enables/disables <debug> blocks in js output, see build.options | |
89 | +build.options.debug=false | |
90 | + | |
91 | +# This property can be used to pass custom build options in addition to any of the other | |
92 | +# build.options flags. When overlapping, these options take priority, see build.options | |
93 | +build.options.custom= | |
94 | + | |
95 | +# This value is specified by the framework | |
96 | +build.options.default= | |
97 | + | |
98 | +# This property contains the framework ("product") used for filtering of JavaScript using | |
99 | +# the preprocessor. This is set by either ext.properties or touch.properties. | |
100 | +# | |
101 | +#build.options.product=touch | |
102 | + | |
103 | +# This property contains the desired API level used for preprocessor filtering of JavaScript. | |
104 | +# This is set by either ext.properties or touch.properties. | |
105 | +# | |
106 | +#build.options.minVersion=2.1 | |
107 | + | |
108 | +# This property holds the set of js preprocessor options in the form: | |
109 | +# | |
110 | +# name1:value1,name2:value2,... | |
111 | +# | |
112 | +# (used by -init-compiler in init-impl.xml) | |
113 | +# | |
114 | +# This property is not likely to be set directly. Rather, you should set one of the | |
115 | +# contributing properties that are combined to form this one: | |
116 | +# | |
117 | +# build.options.debug | |
118 | +# build.options.logger | |
119 | +# build.options.custom | |
120 | +# | |
121 | +# The other properties that contribute to this are typically not needing to be set: | |
122 | +# | |
123 | +# build.options.product | |
124 | +# build.options.minVersion | |
125 | +# | |
126 | +build.options=logger:${build.options.logger},debug:${build.options.debug},product:${build.options.product},minVersion:${build.options.minVersion},${build.options.default},${build.options.custom} | |
127 | + | |
128 | +# This property can be modified to change general build options | |
129 | +# such as excluding files from the set. The format expects newlines | |
130 | +# for each argument, for example: | |
131 | +# | |
132 | +# build.operations=\ | |
133 | +# exclude\n \ | |
134 | +# -namespace=Ext\n | |
135 | +# | |
136 | +# NOTE: modifications to build.operations are intended to be | |
137 | +# placed in an override of the "-after-init" target, where it | |
138 | +# can be calculated based on other | |
139 | +# ant properties | |
140 | +# | |
141 | +# build.operations= | |
142 | + | |
143 | +# enables / disables the full class optimizer during js builds | |
144 | +# (used by the -compile-* targets in js-impl.xml) | |
145 | +build.optimize.enable=\ | |
146 | + optimize\n \ | |
147 | + -define-rewrite\n | |
148 | +build.optimize.disable= | |
149 | +build.optimize=${build.optimize.disable} | |
150 | + | |
151 | +# enables / disables yui compression | |
152 | +build.compression.yui=0 | |
153 | + | |
154 | +# enables / disables closure compression | |
155 | +build.compression.closure=0 | |
156 | + | |
157 | +# enables / disables uglify compression | |
158 | +build.compression.ugilfy=0 | |
159 | + | |
160 | +build.compile.temp.dir=${build.temp.dir}/sencha-compiler | |
161 | + | |
162 | +# controles whether to keep the temp compile dir after the build | |
163 | +build.compile.temp.dir.keep=true | |
164 | + | |
165 | +# ------------------------------------------ | |
166 | +# DOC ONLY - Do Not Set | |
167 | +# this variable will be set to the appropriate compressor | |
168 | +# option, and is calculated in init-impl.xml, but may be overridded in | |
169 | +# app.properties, <environment>.properties, or via command line | |
170 | +# | |
171 | +# build.compression= | |
172 | +# ------------------------------------------ | |
173 | + | |
174 | +# ***************************************************************************** | |
175 | +# Page | |
176 | +# these variables control aspects of building the output markup page | |
177 | +# ***************************************************************************** | |
178 | + | |
179 | +# controls whether the output will be microloader-enabled, or markup only | |
180 | +build.output.markuponly=false | |
181 | + | |
182 | +# controls whether the microloader content will be embedded in the output | |
183 | +# markup, or left as a separate resource | |
184 | +build.enable.embedded.microloader=true | |
185 | + | |
186 | +# whether to include the page's manifest.json code with the | |
187 | +# microloader content. Production.properties files should set this to | |
188 | +# false to have app.json exist as a server resource. | |
189 | +build.enable.embedded.manifest=true | |
190 | + | |
191 | +# enables / disables delta patch generation | |
192 | +enable.deltas=false | |
193 | + | |
194 | +# enables / disables generation of cache manifest | |
195 | +enable.cache.manifest=false | |
196 | + | |
197 | +# enables / disables compression of resources referenced in app.json / package.json | |
198 | +# js and css entries | |
199 | +enable.resource.compression=false | |
200 | + | |
201 | +# defaults to index.html, but may be overridden in app.json | |
202 | +app.indexHtmlPath=index.html | |
203 | + | |
204 | +# the input page file for the application | |
205 | +app.page.name=${app.indexHtmlPath} | |
206 | +app.page.file=${app.dir}/${app.page.name} | |
207 | + | |
208 | +# the output page file | |
209 | +build.page.name=${app.page.name} | |
210 | +build.page.file=${build.dir}/${build.page.name} | |
211 | + | |
212 | +# the directory where the microloader files may be found | |
213 | +app.microloader.dir=${app.config.dir}/microloader | |
214 | + | |
215 | +# the file names of the individual microloaders | |
216 | +app.microloader.development=development.js | |
217 | +app.microloader.testing=testing.js | |
218 | +app.microloader.production=production.js | |
219 | + | |
220 | +# the target microloader to use for builds | |
221 | +app.microloader.name=${app.microloader.development} | |
222 | +app.microloader.path=${app.microloader.dir}/${app.microloader.name} | |
223 | + | |
224 | +# specifies how to embed the microloader code into the output markup | |
225 | +# {0} is replaced with the content of the microloader file specified | |
226 | +# by app.microloader.path | |
227 | +build.microloader.code.tpl={0} | |
228 | + | |
229 | +# the template to use when generating a stand-alone json manifest file | |
230 | +build.microloader.json.tpl.standalone={0} | |
231 | + | |
232 | +# the template to use when embedding the manifest json directly next to the | |
233 | +# microloader in the output microloader content | |
234 | +build.microloader.json.tpl.embedded=Ext.blink({0}); | |
235 | + | |
236 | +# the template to use in the output microloader content when supplying | |
237 | +# the manifest json as a separate server-side resource ('production' builds) | |
238 | +build.microloader.json.tpl.external=Ext.blink('{'id:''${app.id}'''}'); | |
239 | + | |
240 | +# the template string to use when embedding the microloader content | |
241 | +# into the output markup | |
242 | +build.embedded.microloader.tpl=<script type="text/javascript">{0}</script> | |
243 | + | |
244 | +# the compressor to use when embedding the microloader into a page | |
245 | +# can be -closure or -yui, or leave empty to disable compression | |
246 | +build.embedded.microloader.compressor= | |
247 | + | |
248 | +# the name of the output microloader file | |
249 | +build.microloader.name=microloader.js | |
250 | + | |
251 | +# the path to the microloader content file, if external to the outpout markup | |
252 | +build.microloader.path=${build.dir}/${build.microloader.name} | |
253 | + | |
254 | +# the inner markup to embed into the output markup when not including | |
255 | +# the microloader content directly into the output markup | |
256 | +build.embedded.microloader.src=${build.microloader.name} | |
257 | +build.external.microloader.markup=<script src="${build.embedded.microloader.src}"></script> | |
258 | + | |
259 | +# a flag indicating which mode the microloader should run in (production, testing, etc.) | |
260 | +# currently unused : is a placeholder for future microloader interactions | |
261 | +build.microloader.mode=${build.environment} | |
262 | + | |
263 | +# the tag name to use when generating the compiler save set for | |
264 | +# the page's js code | |
265 | +build.tag.name=full-page | |
266 | + | |
267 | +# the name of the archive folder containing source versions for | |
268 | +# delta patch generation | |
269 | +build.archive.name=archive | |
270 | +build.out.archive.path=${workspace.build.dir}/${build.archive.name}/${app.name} | |
271 | + | |
272 | +# the name of the output folder for calculated delta patches | |
273 | +build.deltas.name=deltas | |
274 | +build.out.delta.path=${build.dir}/${build.deltas.name} | |
275 | + | |
276 | +# the output cache manifest file | |
277 | +build.manifest.name=cache.appcache | |
278 | +build.manifest.path=${build.dir}/${build.manifest.name} | |
279 | + | |
280 | +# the path to the output markup page | |
281 | +build.out.page.path=${build.dir}/${app.page.name} | |
282 | + | |
283 | +# the name of the manifest json file | |
284 | +build.json.name=app.json | |
285 | + | |
286 | +# the full path to the manifest json file | |
287 | +build.out.json.path=${build.dir}/${build.json.name} | |
288 | + | |
289 | +# Defines the file that will contain Ext.setVersion calls for each used package. | |
290 | +build.out.package.versions=${build.compile.temp.dir}/cmd-packages.js | |
291 | + | |
292 | +# a temp directory for managing extracted resources during the page build | |
293 | +build.app.temp.dir=${build.compile.temp.dir}/app | |
294 | + | |
295 | +# controls the format of checksum headers injected into microloaded content | |
296 | +# either comment style, or code style for js and css files | |
297 | +delta.comment.checksums=false | |
298 | + | |
299 | +# ***************************************************************************** | |
300 | +# Refresh | |
301 | +# these properties are used for generating bootstrap js and css | |
302 | +# files to support dev-time interaction with the app | |
303 | +# ***************************************************************************** | |
304 | + | |
305 | +# the base path to use for generating / calculating bootstrap info | |
306 | +app.bootstrap.base.path=${app.dir} | |
307 | + | |
308 | +# these control the name of the bootstrap js file | |
309 | +# note: there will be corresponding entries in either the index page | |
310 | +# or app.json that reference these names | |
311 | +app.bootstrap.js.name=bootstrap.js | |
312 | +app.bootstrap.js=${app.bootstrap.base.path}/${app.bootstrap.js.name} | |
313 | + | |
314 | +# these control the name of the bootstrap css file (for ext 4.2+ apps) | |
315 | +# note: there will be corresponding entries in either the index page | |
316 | +# or app.json that reference these names | |
317 | +app.bootstrap.css.name=bootstrap.css | |
318 | +app.bootstrap.css=${app.bootstrap.base.path}/${app.bootstrap.css.name} | |
319 | + | |
320 | +# the microloader to use for bootstrapping operations | |
321 | +app.microloader.bootstrap=${app.microloader.dir}/${app.microloader.development} | |
322 | + | |
323 | +# the name of the bootstrap microloader manifest | |
324 | +build.json.bootstrap.name=bootstrap.json | |
325 | + | |
326 | +# the full path to the bootstrap microloader manifest | |
327 | +build.json.bootstrap.path=${app.dir}/${build.json.bootstrap.name} | |
328 | + | |
329 | +# ***************************************************************************** | |
330 | +# Sass / Css | |
331 | +# properties for controling features of sass generation and compilation | |
332 | +# ***************************************************************************** | |
333 | + | |
334 | +# controls the ruby command that is used to execute compasss | |
335 | +# a full path to ruby may be specified rather than allowing the system | |
336 | +# shell to resolve the command | |
337 | +build.ruby.path=ruby | |
338 | + | |
339 | +# -------------------- | |
340 | +# these control properties select the mode used to build the app's styling | |
341 | +# see sass-impl.xml for how then are used | |
342 | + | |
343 | +# enables theme builds for apps using ext 41 style themes | |
344 | +enable.ext41.themes=false | |
345 | + | |
346 | +# enables theme builds for apps using ext 42 style themes | |
347 | +enable.ext42.themes=false | |
348 | + | |
349 | +# enables theme builds for apps using touch style themes | |
350 | +enable.touch.themes=false | |
351 | +# -------------------- | |
352 | + | |
353 | +# selector count threshold to use when | |
354 | +# splitting a single css file into multiple | |
355 | +# css files (IE selector limit workaround) | |
356 | +# | |
357 | +# NOTE: applies only to ext js 4.2+ style theme management, currently | |
358 | +# see the above theme control variables for details | |
359 | +build.css.selector.limit=4095 | |
360 | + | |
361 | +# enables / disable css preprocessor (enable.ext42.themes only) | |
362 | +build.css.preprocess=true | |
363 | + | |
364 | +# sets the css preprocessor options, in the form: | |
365 | +# name1:value1,name2:value2,... | |
366 | +build.css.preprocessor.opts= | |
367 | + | |
368 | +# enables / disable css compressor (enable.ext42.themes only) | |
369 | +build.css.compress=true | |
370 | + | |
371 | +# controls the directory used to generate the output app scss file | |
372 | +# for apps that use theme packages | |
373 | +build.sass.dir=${build.temp.dir}/sass | |
374 | + | |
375 | +# Specify the name for the individual resource dirs in the app | |
376 | +# (enable.touch.themes only) | |
377 | +app.sass.name=sass | |
378 | + | |
379 | +# Specify the sass path in the app | |
380 | +# (enable.touch.themes only) | |
381 | +app.sass.dir=${app.dir}/resources/${app.sass.name} | |
382 | + | |
383 | +# name prefix to use for output css / sass files | |
384 | +app.out.base=${app.name}-all | |
385 | +app.out.base.debug=${app.out.base} | |
386 | + | |
387 | +# the output sass file to generate (used with enable.ext42.themes) | |
388 | +app.out.scss=${build.sass.dir}/${app.out.base.debug}.scss | |
389 | +# the output ruby compass config file to generate (used with enable.ext42.themes) | |
390 | +app.out.ruby=${build.sass.dir}/config.rb | |
391 | + | |
392 | +# output css file prefix | |
393 | +app.out.css.prefix=${app.out.base.debug} | |
394 | + | |
395 | +# output css file name | |
396 | +app.out.css.name=${app.out.css.prefix}.css | |
397 | + | |
398 | +# output css file path (relative to build directory root | |
399 | +app.out.css.rel=resources/${app.out.css.name} | |
400 | + | |
401 | +# output css file path (full path) | |
402 | +app.out.css=${build.dir}/${app.out.css.rel} | |
403 | + | |
404 | +# separate file name to use for generating a compressed copy | |
405 | +# of the output css file (this default will compress the file in-place) | |
406 | +app.out.css.compressed=${build.dir}/resources/${app.out.base}.css | |
407 | + | |
408 | +# the directory containing sass files for compass to compile | |
409 | +compass.sass.dir=${build.sass.dir} | |
410 | + | |
411 | +# the output directory where compass should place built css files | |
412 | +compass.css.dir=${build.dir}/resources | |
413 | + | |
414 | +# the directory containing the ruby config file for compass | |
415 | +compass.config.file=${app.out.ruby} | |
416 | + | |
417 | +# enables / disables console highlighting for compass | |
418 | +compass.compile.boring=false | |
419 | + | |
420 | +# enables / disables forced rebuilds for compass | |
421 | +compass.compile.force=true | |
422 | + | |
423 | +# enables / disables stack traces in compass failure output | |
424 | +compass.compile.trace=true | |
425 | + | |
426 | +# the directory that will be the current working directory of the compass | |
427 | +# process (controls the location of .sass-cache folder creation) | |
428 | +# NOTE: this directory will also typically need to contain the config.rb file | |
429 | +# used for compass invocation, so it is ideal to set build.sass.dir instead of this | |
430 | +# variable, as that will control both the config.rb location as well as the | |
431 | +# .sass-cache location | |
432 | +compass.working.dir=${build.sass.dir} | |
433 | + | |
434 | +# --------------------------------------------------- | |
435 | +# Legacy properties for ext41 theme directories | |
436 | +# Specify the resources path in the app | |
437 | +app.packages.dir=${app.dir}/packages | |
438 | + | |
439 | +# Specify the theme path in the app (this directory contains the themes) | |
440 | +app.theme.dir=${app.packages.dir} | |
441 | + | |
442 | +# the currently selected ext 41 theme name | |
443 | +theme.name=default | |
444 | +# --------------------------------------------------- | |
445 | + | |
446 | +# ***************************************************************************** | |
447 | +# Slice | |
448 | +# these properties control features of the theme slice build phase | |
449 | +# ***************************************************************************** | |
450 | + | |
451 | +# the resources directory of the application | |
452 | +# note: this property is currently only used for building ext 4.1 style themes | |
453 | +# (used by x-build-theme and x-copy-resources in slice-impl.xml) | |
454 | +app.resources.dir=${app.dir}/resources | |
455 | + | |
456 | +# the directory containing the slicer widget example page | |
457 | +app.example.dir=${app.dir}/sass/example | |
458 | + | |
459 | +# properties to control the recirect css file that is | |
460 | +# generated for the slicer example page | |
461 | +app.example.css.name=example.css | |
462 | +app.example.css.file=${app.example.dir}/${app.example.css.name} | |
463 | + | |
464 | +# the base path for generating the bootstrap code for the | |
465 | +# slicer page | |
466 | +bootstrap.base.path=${app.example.dir} | |
467 | + | |
468 | +# the full file name of the slicer page's bootstrap js file | |
469 | +bootstrap.example.js=${app.example.dir}/bootstrap.js | |
470 | + | |
471 | +# this is the directory used for intermediate build artifacts used | |
472 | +# by the slicer for generating theme images | |
473 | +app.example.build.dir=${build.temp.dir}/slicer-temp | |
474 | + | |
475 | +# the name of the intermediate screenshot file used for image slicing | |
476 | +build.capture.png=${app.example.build.dir}/theme-capture.png | |
477 | + | |
478 | +# the name of the intermediate widget manifest file used for image slicing | |
479 | +build.capture.json=${app.example.build.dir}/theme-capture.json | |
480 | + | |
481 | +# the location of the slicer widget page | |
482 | +app.example.theme.html.name=theme.html | |
483 | +app.example.theme.html=${app.example.dir}/${app.example.theme.html.name} | |
484 | + | |
485 | +# a name prefix used for slicer page temporary artifacts | |
486 | +app.example.base=${app.name}-example | |
487 | + | |
488 | +# the special slicer page scss file name to generate | |
489 | +app.example.scss=${app.example.build.dir}/${app.example.base}.scss | |
490 | + | |
491 | +# the relative path from the slicer css file to the slicer html file | |
492 | +app.example.css.rel=${app.example.base}.css | |
493 | + | |
494 | +# the path to the css file that will be built for the slicer page | |
495 | +app.example.css=${app.example.build.dir}/${app.example.css.rel} | |
496 | + | |
497 | +# the ruby compass config file to generate for slicer page scss | |
498 | +app.example.out.ruby=${app.example.build.dir}/config.rb | |
499 | +app.example.compass.config=${app.example.out.ruby} | |
500 | + | |
501 | +# legacy ext 41 theme property indicating the name of the | |
502 | +# slicer example page contained in the theme directory | |
503 | +theme.page.name=theme.html | |
504 | + | |
505 | +# Options to pass to the "sencha fs slice" command. | |
506 | +build.slice.options= | |
507 | + | |
508 | +# ***************************************************************************** | |
509 | +# Packager | |
510 | +# these properties control features of the native packaging phase of the | |
511 | +# build process | |
512 | +# ***************************************************************************** | |
513 | + | |
514 | +# enables packaging the built application with the Sencha Desktop Packager | |
515 | +# NOTE: currently unsupported | |
516 | +enable.desktop.packager=false | |
517 | + | |
518 | +# skips packaging the built application with sencha mobile packager (stbuild) or cordova/phonegap | |
519 | +skip.native-package=true | |
520 | + | |
521 | +# a property that controls whether a standalone manifest.json file will be | |
522 | +# generated for the native packaged application | |
523 | +enable.standalone.manifest=false | |
524 | + | |
525 | +# these set the name of the mobile native packager's config file | |
526 | +build.mobile.packager.name=packager.json | |
527 | +build.mobile.packager.file=${app.dir}/${build.mobile.packager.name} | |
528 | + | |
529 | +# the default mobile packager config to use when specifying the autorun argument | |
530 | +# with "sencha app build -run native" | |
531 | +build.mobile.packager.default.name=packager.json | |
532 | +build.mobile.packager.default.file=${app.dir}/${build.mobile.packager.default.name} | |
533 | + | |
534 | +# these set the name of the mobile native packager's temporary config file | |
535 | +# that will have the input and output path properties updated | |
536 | +build.mobile.packager.temp.name=packager.temp.json | |
537 | +build.mobile.packager.temp.file=${app.dir}/${build.mobile.packager.temp.name} | |
538 | + | |
539 | +# the input directory for the mobile native packager that contains the | |
540 | +# built Sencha Cmd application | |
541 | +build.mobile.packager.in.dir=${build.dir} | |
542 | + | |
543 | +# the output location of the mobile native packaged application | |
544 | +build.mobile.packager.out.dir.name=native-package-mobile | |
545 | +build.mobile.packager.out.dir=${workspace.build.dir}/${build.mobile.packager.out.dir.name}/${app.name} | |
546 | + | |
547 | +# ***************************************************************************** | |
548 | +# Resolve | |
549 | +# these properties control aspects of the dynamic dependency resolver, which | |
550 | +# uses phantomjs to load the applicaiton and extract Ext.Loader class load | |
551 | +# history. | |
552 | +# ***************************************************************************** | |
553 | + | |
554 | +# enables / disables dynamic dependency resolution | |
555 | +skip.resolve=true | |
556 | + | |
557 | +# enables the local web server. this may be disabled to load the application's | |
558 | +# page from an existing web server. | |
559 | +skip.web-start=false | |
560 | + | |
561 | +# the port number to start the local web server on | |
562 | +build.web.port=54321 | |
563 | + | |
564 | +# the directory representing the root web folder | |
565 | +build.web.root=${workspace.dir} | |
566 | + | |
567 | +# the base url to access the local web server | |
568 | +build.resolve.url=http://localhost:${build.web.port} | |
569 | + | |
570 | +# a template string used to format the detected dynamic dependencies | |
571 | +build.resolve.tpl={0} | |
572 | + | |
573 | +# the mode to use when formatting the detected dynamic dependencies | |
574 | +build.resolve.mode=references | |
575 | + | |
576 | +# the output file for the detected dynamic dependencies | |
577 | +build.resolve.file=${build.temp.dir}/resolve.json | |
578 | + | |
579 | +# controls whether unmatched external references in the specified file will | |
580 | +# generate build warnings or build failures | |
581 | +build.resolve.allow.unmatched=true | |
582 | + | |
583 | +# ***************************************************************************** | |
584 | +# Watch | |
585 | +# these properties adjust the behavior of the app watch process. | |
586 | +# ***************************************************************************** | |
587 | + | |
588 | +# the default set of actions to run when triggering a rebuild | |
589 | +build.trigger.targets=-refresh,-resources,-compass-compile | |
590 | + | |
591 | +# the watcher targets to run that monitor for code changes | |
592 | +build.watcher.targets=-watch-compiler | |
... | ... |
... | ... | @@ -0,0 +1,28 @@ |
1 | +# ============================================================================= | |
2 | +# This file defines default property values that apply to all builds based on | |
3 | +# Ext JS 4.2.x framework. | |
4 | +# | |
5 | +# Please use build.properties to customize these properties. | |
6 | +# | |
7 | +# To override a property based on build.environment instead add properties to | |
8 | +# one of these higher priority files: | |
9 | +# | |
10 | +# - production.properties | |
11 | +# - testing.properties | |
12 | +# - native.properties | |
13 | +# - package.properties | |
14 | +# | |
15 | +# The properties defined in this file take priority over defaults.properties | |
16 | +# and *.defaults.properties. | |
17 | +# | |
18 | +# IMPORTANT - This file should not be modified by an app as it is overwritten | |
19 | +# during each app upgrade. | |
20 | +# ============================================================================= | |
21 | + | |
22 | +enable.ext42.themes=true | |
23 | + | |
24 | +build.output.markuponly=true | |
25 | + | |
26 | +build.options.product=ext | |
27 | + | |
28 | +build.options.minVersion=4.2 | |
... | ... |
... | ... | @@ -0,0 +1,58 @@ |
1 | +<project name="find-cmd-impl"> | |
2 | + <!-- | |
3 | + Run "sencha which" to find the Sencha Cmd basedir and get "cmd.dir" setup. We | |
4 | + need to execute the command with curdir set properly for Cmd to pick up that we | |
5 | + are running for an application. | |
6 | + --> | |
7 | + <target name="find-cmd-in-path" unless="cmd.dir"> | |
8 | + <exec executable="sencha" | |
9 | + dir="${basedir}" | |
10 | + failifexecutionfails="false" | |
11 | + outputproperty="exec.error"> | |
12 | + <arg value="which"/> | |
13 | + <arg value="-p=cmd.dir"/> | |
14 | + <arg value="-o=$cmddir$"/> | |
15 | + </exec> | |
16 | + | |
17 | + <!-- Now read the generated properties file and delete it --> | |
18 | + <property file="$cmddir$"/> | |
19 | + <delete file="$cmddir$"/> | |
20 | + </target> | |
21 | + | |
22 | + <!-- | |
23 | + Run "sencha which" again, similar to the above target, but explicitly check | |
24 | + for the 'SENCHA_CMD' environment variable to have been set, in case sencha | |
25 | + cmd isn't on the current path settings for the user | |
26 | + --> | |
27 | + <target name="find-cmd-in-environment" unless="cmd.dir"> | |
28 | + <exec executable="${env.SENCHA_CMD}/sencha" | |
29 | + dir="${basedir}" | |
30 | + failifexecutionfails="false"> | |
31 | + <arg value="which"/> | |
32 | + <arg value="-p=cmd.dir"/> | |
33 | + <arg value="-o=$cmddir$"/> | |
34 | + </exec> | |
35 | + | |
36 | + <property file="$cmddir$"/> | |
37 | + <delete file="$cmddir$"/> | |
38 | + </target> | |
39 | + | |
40 | + <!-- | |
41 | + == Mac OSX launchd fix == | |
42 | + create a child shell process that will source in ~/.bash_profile | |
43 | + and then attempt to call 'sencha which' with the current user's | |
44 | + shell profile settings. sencha which will create a properties file | |
45 | + that can then be loaded into this (the parent) process. | |
46 | + | |
47 | + This allows ant integrations in IDE's like netbeans or eclipse to properly | |
48 | + locate Sencha Cmd, even if the IDE was launched via launchd (Finder) | |
49 | + --> | |
50 | + <target name="find-cmd-in-shell" unless="cmd.dir"> | |
51 | + <delete quiet="true" file="$cmddir$"/> | |
52 | + <echo file="tmp.sh"> source ~/.bash_profile; sencha which -p cmd.dir -o '$cmddir$'</echo> | |
53 | + <exec executable="/bin/sh"><arg value="tmp.sh"/></exec> | |
54 | + <property file="$cmddir$"/> | |
55 | + <delete file="tmp.sh"/> | |
56 | + <delete file="$cmddir$"/> | |
57 | + </target> | |
58 | +</project> | |
0 | 59 | \ No newline at end of file |
... | ... |
... | ... | @@ -0,0 +1,214 @@ |
1 | +<project name="init-impl"> | |
2 | + <!-- | |
3 | + Init-Local | |
4 | + --> | |
5 | + <target name="-before-init-local"/> | |
6 | + <target name="-init-local"> | |
7 | + <!-- | |
8 | + ${basedir} is actually the basedir of build.xml, in the app root | |
9 | + so this imports ${app.dir}/local.properties, if present | |
10 | + --> | |
11 | + <property file="${basedir}/local.properties"/> | |
12 | + | |
13 | + <!-- | |
14 | + This will traverse upwards in the file system, starting at the | |
15 | + app root directory, looking for the workspace. Once found, | |
16 | + ${workspace.dir}/local.properties will be imported into this | |
17 | + project | |
18 | + --> | |
19 | + <script language="javascript"> | |
20 | + <![CDATA[ | |
21 | + var f = new java.io.File(project.getProperty("basedir")); | |
22 | + var sub = ".sencha/workspace/sencha.cfg"; | |
23 | + | |
24 | + for (var p = f; p; p = p.getParentFile()) { | |
25 | + var t = new java.io.File(p, sub); | |
26 | + if (t.exists()) { | |
27 | + // we found the workspace folder! | |
28 | + | |
29 | + t = new java.io.File(p, "local.properties"); | |
30 | + if (t.exists()) { | |
31 | + var loader = project.createTask("property"); | |
32 | + loader.setFile(new java.io.File(t.getCanonicalPath())); | |
33 | + loader.execute(); | |
34 | + } | |
35 | + | |
36 | + break; | |
37 | + } | |
38 | + } | |
39 | + ]]> | |
40 | + </script> | |
41 | + | |
42 | + </target> | |
43 | + <target name="-after-init-local"/> | |
44 | + <target name="init-local" | |
45 | + depends="-before-init-local,-init-local,-after-init-local"/> | |
46 | + | |
47 | + <target name="-before-init"/> | |
48 | + <target name="-init" unless="internal.x-sencha-initialized"> | |
49 | + <!-- | |
50 | + Now, apply various project updates, such as ant class loader path | |
51 | + updates, as well as loading Sencha Cmd config system properties | |
52 | + into ant property space | |
53 | + --> | |
54 | + <x-sencha-init prefix=""/> | |
55 | + | |
56 | + <!-- | |
57 | + default the build environment to production if it is unset by this point | |
58 | + --> | |
59 | + <property name="build.environment" value="production"/> | |
60 | + <property name="CR" value=" "/> | |
61 | + | |
62 | + <x-load-properties> | |
63 | + <!-- Load user-defined properties for environment then general: --> | |
64 | + <file path="${app.config.dir}/${build.environment}.properties" required="false"/> | |
65 | + <file path="${app.config.dir}/build.properties" required="false"/> | |
66 | + <!-- Pick up the defaults by framework/environment followed by general: --> | |
67 | + <file path="${app.config.dir}/${framework.name}.properties" required="true"/> | |
68 | + <file path="${app.config.dir}/${build.environment}.defaults.properties" required="true"/> | |
69 | + <file path="${app.config.dir}/defaults.properties" required="true"/> | |
70 | + </x-load-properties> | |
71 | + | |
72 | + <!-- | |
73 | + calculate the appropriate build.compression value | |
74 | + --> | |
75 | + <condition property="build.compression" value="-yui"> | |
76 | + <x-is-true value="${build.compression.yui}"/> | |
77 | + </condition> | |
78 | + | |
79 | + <condition property="build.compression" value="-closure"> | |
80 | + <x-is-true value="${build.compression.closure}"/> | |
81 | + </condition> | |
82 | + | |
83 | + <condition property="build.compression" value="-uglify"> | |
84 | + <x-is-true value="${build.compression.uglify}"/> | |
85 | + </condition> | |
86 | + | |
87 | + <property name="build.compression" value=""/> | |
88 | + | |
89 | + <x-verify-app-cmd-ver/> | |
90 | + | |
91 | + <!-- | |
92 | + this id string is used to share a common compiler instance | |
93 | + for all x-compile calls in this project | |
94 | + --> | |
95 | + <property name="compiler.ref.id" value="app-compiler"/> | |
96 | + | |
97 | + <!-- | |
98 | + this property is set indicating we've reached the end of the | |
99 | + core init phase. it's presence will indicate that we've already | |
100 | + executed this target, and will bypass firing the init code | |
101 | + repeatedly in sub projects (antcall, x-ant-call) | |
102 | + See the above 'unless' attribute on the -init target | |
103 | + --> | |
104 | + <property name="internal.x-sencha-initialized" value="true"/> | |
105 | + </target> | |
106 | + <target name="-after-init"/> | |
107 | + | |
108 | + <target name="-before-init-defaults"/> | |
109 | + <target name="-init-defaults"> | |
110 | + <!-- | |
111 | + This property can be modified to change general build options | |
112 | + such as excluding files from the set. The format expects newlines | |
113 | + for each argument, for example: | |
114 | + | |
115 | + <property name="build.operations"/> | |
116 | + exclude | |
117 | + -namespace=Ext | |
118 | + </property> | |
119 | + --> | |
120 | + <property name="build.operations" value=""/> | |
121 | + | |
122 | + <!-- | |
123 | + This property can be modified to change concatenation | |
124 | + specific options | |
125 | + | |
126 | + -strip-comments: comment suppression | |
127 | + -remove-text-references: transform string literal class references to objects | |
128 | + -beautify: unpack the source | |
129 | + | |
130 | + <property name="build.concat.options"/> | |
131 | + -strip-comments | |
132 | + -remove-text-references | |
133 | + -beautify | |
134 | + </property> | |
135 | + --> | |
136 | + <property name="build.concat.options" value=""/> | |
137 | + | |
138 | + <!-- | |
139 | + This property can be modified to change page compilation options | |
140 | + | |
141 | + -scripts: inject the given script path into the generated markup ahead of the all classes file | |
142 | + | |
143 | + <property name="build.page.options"/> | |
144 | + -scripts=framework.js | |
145 | + </property> | |
146 | + --> | |
147 | + <property name="build.page.options" value=""/> | |
148 | + </target> | |
149 | + <target name="-after-init-defaults"/> | |
150 | + | |
151 | + <!-- | |
152 | + Initializes the compiler instances, reading in the app.json and package.json | |
153 | + definitions, as well as scanning and parsing all js files found on the | |
154 | + various classpath entries for the framework, workspace, packages, and app | |
155 | + --> | |
156 | + <target name="-init-compiler" depends="-init"> | |
157 | + <condition property="internal.app.css.rel" value="${app.out.css.rel}"> | |
158 | + <x-is-true value="${enable.ext42.themes}"/> | |
159 | + </condition> | |
160 | + <property name="internal.app.css.rel" value=""/> | |
161 | + | |
162 | + <x-compile refid="${compiler.ref.id}" | |
163 | + dir="${app.dir}" | |
164 | + initOnly="true" | |
165 | + inheritAll="true"> | |
166 | + <![CDATA[ | |
167 | + # base build command | |
168 | + -tempDir=${build.compile.temp.dir} | |
169 | + -keepTempDir=${build.compile.temp.dir.keep} | |
170 | + -options=${build.options} | |
171 | + load-app | |
172 | + -frameworkFile=${build.framework.name} | |
173 | + -jsBundleFile=${build.classes.name} | |
174 | + -cssBundleFile=${internal.app.css.rel} | |
175 | + -tempDir=${build.app.temp.dir} | |
176 | + -tag=${build.tag.name} | |
177 | + and | |
178 | + restore | |
179 | + ${build.tag.name} | |
180 | + and | |
181 | + meta | |
182 | + +packages | |
183 | + -out=${build.out.package.versions} | |
184 | + and | |
185 | + classpath | |
186 | + -path=${build.out.package.versions} | |
187 | + -name=framework | |
188 | + and | |
189 | + require | |
190 | + -source=@${build.tag.name} | |
191 | + -requires=@overrides | |
192 | + -allow-unmet=true | |
193 | + and | |
194 | + require | |
195 | + -scopeName=framework | |
196 | + -source=Ext.util.Observable | |
197 | + -requires=${build.out.package.versions} | |
198 | + -allow-unmet=false | |
199 | + and | |
200 | + union | |
201 | + -recursive | |
202 | + -tag=${build.tag.name} | |
203 | + and | |
204 | + save | |
205 | + ${build.tag.name}-overrides | |
206 | + and | |
207 | + ${build.operations} | |
208 | + and | |
209 | + save | |
210 | + page | |
211 | + ]]> | |
212 | + </x-compile> | |
213 | + </target> | |
214 | +</project> | |
... | ... |
... | ... | @@ -0,0 +1,78 @@ |
1 | +<project name="js-impl"> | |
2 | + <!-- | |
3 | + this target extracts split mode information from the compiler's app | |
4 | + processor to determine various pieces of information | |
5 | + --> | |
6 | + <target name="-detect-app-build-properties" | |
7 | + depends="-init-compiler"> | |
8 | + <x-load-app-builder-properties | |
9 | + refid="${compiler.ref.id}" | |
10 | + splitModePropName="enable.split.mode" | |
11 | + pageModePropName="app.page.mode"/> | |
12 | + </target> | |
13 | + | |
14 | + <!-- | |
15 | + this is the standard js compile target that builds the output js file(s) | |
16 | + --> | |
17 | + <target name="-compile-js" depends="-detect-app-build-properties"> | |
18 | + <if> | |
19 | + <x-is-true value="${enable.split.mode}"/> | |
20 | + <then> | |
21 | + <x-compile refid="${compiler.ref.id}"> | |
22 | + <![CDATA[ | |
23 | + # build a separate sdk-only js file | |
24 | + union | |
25 | + -tag=package-sencha-core,framework | |
26 | + and | |
27 | + ${build.optimize} | |
28 | + and | |
29 | + concat | |
30 | + ${build.compression} | |
31 | + -out=${build.framework.file} | |
32 | + ${build.concat.options} | |
33 | + | |
34 | + # now build the all-classes file, without | |
35 | + # the framework code included | |
36 | + and | |
37 | + restore | |
38 | + page | |
39 | + and | |
40 | + exclude | |
41 | + -tag=framework,package-sencha-core | |
42 | + and | |
43 | + ${build.optimize} | |
44 | + and | |
45 | + concat | |
46 | + ${build.compression} | |
47 | + -out=${build.classes.file} | |
48 | + ${build.concat.options} | |
49 | + ]]> | |
50 | + </x-compile> | |
51 | + </then> | |
52 | + <else> | |
53 | + <x-compile refid="${compiler.ref.id}"> | |
54 | + <![CDATA[ | |
55 | + # build an all-classes.js file that contains | |
56 | + # all code needed by the app | |
57 | + restore | |
58 | + page | |
59 | + and | |
60 | + ${build.optimize} | |
61 | + and | |
62 | + concat | |
63 | + ${build.compression} | |
64 | + -out=${build.classes.file} | |
65 | + ${build.concat.options} | |
66 | + ]]> | |
67 | + </x-compile> | |
68 | + </else> | |
69 | + </if> | |
70 | + </target> | |
71 | + | |
72 | + <!-- | |
73 | + Build javascript | |
74 | + --> | |
75 | + <target name="-before-js"/> | |
76 | + <target name="-js" depends="-compile-js"/> | |
77 | + <target name="-after-js"/> | |
78 | +</project> | |
0 | 79 | \ No newline at end of file |
... | ... |
... | ... | @@ -0,0 +1,189 @@ |
1 | +/** | |
2 | + * Sencha Blink - Development | |
3 | + * @author Jacky Nguyen <jacky@sencha.com> | |
4 | + */ | |
5 | +(function() { | |
6 | + var head = document.head || document.getElementsByTagName('head')[0]; | |
7 | + | |
8 | + function write(content) { | |
9 | + document.write(content); | |
10 | + } | |
11 | + | |
12 | + function addMeta(name, content) { | |
13 | + var meta = document.createElement('meta'); | |
14 | + | |
15 | + meta.setAttribute('name', name); | |
16 | + meta.setAttribute('content', content); | |
17 | + head.appendChild(meta); | |
18 | + } | |
19 | + | |
20 | + var xhr = new XMLHttpRequest(); | |
21 | + xhr.open('GET', 'bootstrap.json', false); | |
22 | + xhr.send(null); | |
23 | + | |
24 | + var options = eval("(" + xhr.responseText + ")"), | |
25 | + scripts = options.js || [], | |
26 | + styleSheets = options.css || [], | |
27 | + i, ln, path, platform, theme, exclude; | |
28 | + | |
29 | + if(options.platform && options.platforms && options.platforms[options.platform] && options.platforms[options.platform].js) { | |
30 | + scripts = options.platforms[options.platform].js.concat(scripts); | |
31 | + } | |
32 | + | |
33 | + if (navigator.userAgent.match(/IEMobile\/10\.0/)) { | |
34 | + var msViewportStyle = document.createElement("style"); | |
35 | + msViewportStyle.appendChild( | |
36 | + document.createTextNode( | |
37 | + "@media screen and (orientation: portrait) {" + | |
38 | + "@-ms-viewport {width: 320px !important;}" + | |
39 | + "}" + | |
40 | + "@media screen and (orientation: landscape) {" + | |
41 | + "@-ms-viewport {width: 560px !important;}" + | |
42 | + "}" | |
43 | + ) | |
44 | + ); | |
45 | + document.getElementsByTagName("head")[0].appendChild(msViewportStyle); | |
46 | + } | |
47 | + | |
48 | + addMeta('viewport', 'width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no'); | |
49 | + addMeta('apple-mobile-web-app-capable', 'yes'); | |
50 | + addMeta('apple-touch-fullscreen', 'yes'); | |
51 | + | |
52 | + if (!window.Ext) { | |
53 | + window.Ext = {}; | |
54 | + } | |
55 | + Ext.microloaded = true; | |
56 | + | |
57 | + var filterPlatform = window.Ext.filterPlatform = function(platform) { | |
58 | + var profileMatch = false, | |
59 | + ua = navigator.userAgent, | |
60 | + j, jln; | |
61 | + | |
62 | + platform = [].concat(platform); | |
63 | + | |
64 | + function isPhone(ua) { | |
65 | + var isMobile = /Mobile(\/|\s)/.test(ua); | |
66 | + | |
67 | + // Either: | |
68 | + // - iOS but not iPad | |
69 | + // - Android 2 | |
70 | + // - Android with "Mobile" in the UA | |
71 | + | |
72 | + return /(iPhone|iPod)/.test(ua) || | |
73 | + (!/(Silk)/.test(ua) && (/(Android)/.test(ua) && (/(Android 2)/.test(ua) || isMobile))) || | |
74 | + (/(BlackBerry|BB)/.test(ua) && isMobile) || | |
75 | + /(Windows Phone)/.test(ua); | |
76 | + } | |
77 | + | |
78 | + function isTablet(ua) { | |
79 | + return !isPhone(ua) && (/iPad/.test(ua) || /Android|Silk/.test(ua) || /(RIM Tablet OS)/.test(ua) || | |
80 | + (/MSIE 10/.test(ua) && /; Touch/.test(ua))); | |
81 | + } | |
82 | + | |
83 | + // Check if the ?platform parameter is set in the URL | |
84 | + var paramsString = window.location.search.substr(1), | |
85 | + paramsArray = paramsString.split("&"), | |
86 | + params = {}, | |
87 | + testPlatform, i; | |
88 | + | |
89 | + for (i = 0; i < paramsArray.length; i++) { | |
90 | + var tmpArray = paramsArray[i].split("="); | |
91 | + params[tmpArray[0]] = tmpArray[1]; | |
92 | + } | |
93 | + | |
94 | + testPlatform = params.platform; | |
95 | + if (testPlatform) { | |
96 | + return platform.indexOf(testPlatform) != -1; | |
97 | + } | |
98 | + | |
99 | + for (j = 0, jln = platform.length; j < jln; j++) { | |
100 | + switch (platform[j]) { | |
101 | + case 'phone': | |
102 | + profileMatch = isPhone(ua); | |
103 | + break; | |
104 | + case 'tablet': | |
105 | + profileMatch = isTablet(ua); | |
106 | + break; | |
107 | + case 'desktop': | |
108 | + profileMatch = !isPhone(ua) && !isTablet(ua); | |
109 | + break; | |
110 | + case 'ios': | |
111 | + profileMatch = /(iPad|iPhone|iPod)/.test(ua); | |
112 | + break; | |
113 | + case 'android': | |
114 | + profileMatch = /(Android|Silk)/.test(ua); | |
115 | + break; | |
116 | + case 'blackberry': | |
117 | + profileMatch = /(BlackBerry|BB)/.test(ua); | |
118 | + break; | |
119 | + case 'safari': | |
120 | + profileMatch = /Safari/.test(ua) && !(/(BlackBerry|BB)/.test(ua)); | |
121 | + break; | |
122 | + case 'chrome': | |
123 | + profileMatch = /Chrome/.test(ua); | |
124 | + break; | |
125 | + case 'ie10': | |
126 | + profileMatch = /MSIE 10/.test(ua); | |
127 | + break; | |
128 | + case 'windows': | |
129 | + profileMatch = /MSIE 10/.test(ua) || /Trident/.test(ua); | |
130 | + break; | |
131 | + case 'tizen': | |
132 | + profileMatch = /Tizen/.test(ua); | |
133 | + break; | |
134 | + case 'firefox': | |
135 | + profileMatch = /Firefox/.test(ua); | |
136 | + } | |
137 | + if (profileMatch) { | |
138 | + return true; | |
139 | + } | |
140 | + } | |
141 | + return false; | |
142 | + }; | |
143 | + | |
144 | + | |
145 | + for (i = 0,ln = styleSheets.length; i < ln; i++) { | |
146 | + path = styleSheets[i]; | |
147 | + | |
148 | + if (typeof path != 'string') { | |
149 | + platform = path.platform; | |
150 | + exclude = path.exclude; | |
151 | + theme = path.theme; | |
152 | + path = path.path; | |
153 | + } | |
154 | + | |
155 | + if (platform) { | |
156 | + if (!filterPlatform(platform) || filterPlatform(exclude)) { | |
157 | + continue; | |
158 | + } | |
159 | + | |
160 | + if(!Ext.theme) { | |
161 | + Ext.theme = {}; | |
162 | + } | |
163 | + if(!Ext.theme.name) { | |
164 | + Ext.theme.name = theme || 'Default'; | |
165 | + } | |
166 | + } | |
167 | + | |
168 | + write('<link rel="stylesheet" href="'+path+'">'); | |
169 | + } | |
170 | + | |
171 | + for (i = 0,ln = scripts.length; i < ln; i++) { | |
172 | + path = scripts[i]; | |
173 | + | |
174 | + if (typeof path != 'string') { | |
175 | + platform = path.platform; | |
176 | + exclude = path.exclude; | |
177 | + path = path.path; | |
178 | + } | |
179 | + | |
180 | + if (platform) { | |
181 | + if (!filterPlatform(platform) || filterPlatform(exclude)) { | |
182 | + continue; | |
183 | + } | |
184 | + } | |
185 | + | |
186 | + write('<script src="'+path+'"></'+'script>'); | |
187 | + } | |
188 | + | |
189 | +})(); | |
0 | 190 | \ No newline at end of file |
... | ... |
... | ... | @@ -0,0 +1,788 @@ |
1 | +/** | |
2 | + * Sencha Blink | |
3 | + * @author Jacky Nguyen <jacky@sencha.com> | |
4 | + */ | |
5 | +(function(global) { | |
6 | + var emptyFn = function(){}, | |
7 | + callbacks = [], | |
8 | + doc = global.document, | |
9 | + head = doc.head || doc.getElementsByTagName('head')[0], | |
10 | + addWindowListener = global.addEventListener, | |
11 | + removeWindowListener = global.removeEventListener, | |
12 | + jsonParse = JSON.parse, | |
13 | + a = doc.createElement('a'), | |
14 | + documentLocation = doc.location, | |
15 | + documentUri = documentLocation.protocol + '//' + documentLocation.hostname + documentLocation.pathname + documentLocation.search, | |
16 | + manifestFile = 'app.json', | |
17 | + isRefreshing = false, | |
18 | + activeManifest, appCache, storage; | |
19 | + | |
20 | + try { | |
21 | + storage = global.localStorage; | |
22 | + appCache = global.applicationCache; | |
23 | + } | |
24 | + catch(e) {} | |
25 | + | |
26 | + function getManifestStorageKey(id) { | |
27 | + return id + '-' + documentUri + manifestFile; | |
28 | + } | |
29 | + | |
30 | + function Manifest(manifest) { | |
31 | + var manifestContent; | |
32 | + | |
33 | + if (typeof manifest == 'string') { | |
34 | + manifestContent = manifest; | |
35 | + manifest = jsonParse(manifestContent); | |
36 | + } | |
37 | + else { | |
38 | + manifestContent = JSON.stringify(manifest); | |
39 | + } | |
40 | + | |
41 | + var applicationId = manifest.id, | |
42 | + key = getManifestStorageKey(applicationId), | |
43 | + assetMap = {}; | |
44 | + | |
45 | + function processAsset(asset) { | |
46 | + var uri; | |
47 | + | |
48 | + if (typeof asset == 'string') { | |
49 | + asset = { | |
50 | + path: asset | |
51 | + }; | |
52 | + } | |
53 | + | |
54 | + if (asset.shared) { | |
55 | + asset.version = asset.shared; | |
56 | + uri = asset.shared + asset.path; | |
57 | + } | |
58 | + else { | |
59 | + uri = toAbsoluteUri(asset.path); | |
60 | + } | |
61 | + | |
62 | + asset.uri = uri; | |
63 | + asset.key = applicationId + '-' + uri; | |
64 | + assetMap[uri] = asset; | |
65 | + | |
66 | + return asset; | |
67 | + } | |
68 | + | |
69 | + function processAssets(assets, type) { | |
70 | + var ln = assets.length, | |
71 | + i, asset; | |
72 | + | |
73 | + for (i = 0; i < ln; i++) { | |
74 | + asset = assets[i]; | |
75 | + | |
76 | + assets[i] = asset = processAsset(asset); | |
77 | + | |
78 | + asset.type = type; | |
79 | + asset.index = i; | |
80 | + asset.collection = assets; | |
81 | + asset.ready = false; | |
82 | + asset.evaluated = false; | |
83 | + } | |
84 | + | |
85 | + return assets; | |
86 | + } | |
87 | + | |
88 | + this.key = key; | |
89 | + this.css = processAssets(manifest.css, 'css'); | |
90 | + this.js = processAssets(manifest.js, 'js'); | |
91 | + | |
92 | + Ext.microloaded = true; | |
93 | + | |
94 | + var filterPlatform = window.Ext.filterPlatform = function(platform) { | |
95 | + var profileMatch = false, | |
96 | + ua = navigator.userAgent, | |
97 | + j, jln; | |
98 | + | |
99 | + platform = [].concat(platform); | |
100 | + | |
101 | + function isPhone(ua) { | |
102 | + var isMobile = /Mobile(\/|\s)/.test(ua); | |
103 | + | |
104 | + // Either: | |
105 | + // - iOS but not iPad | |
106 | + // - Android 2 | |
107 | + // - Android with "Mobile" in the UA | |
108 | + | |
109 | + return /(iPhone|iPod)/.test(ua) || | |
110 | + (!/(Silk)/.test(ua) && (/(Android)/.test(ua) && (/(Android 2)/.test(ua) || isMobile))) || | |
111 | + (/(BlackBerry|BB)/.test(ua) && isMobile) || | |
112 | + /(Windows Phone)/.test(ua); | |
113 | + } | |
114 | + | |
115 | + function isTablet(ua) { | |
116 | + return !isPhone(ua) && (/iPad/.test(ua) || /Android|Silk/.test(ua) || /(RIM Tablet OS)/.test(ua) || | |
117 | + (/MSIE 10/.test(ua) && /; Touch/.test(ua))); | |
118 | + } | |
119 | + | |
120 | + // Check if the ?platform parameter is set in the URL | |
121 | + var paramsString = window.location.search.substr(1), | |
122 | + paramsArray = paramsString.split("&"), | |
123 | + params = {}, | |
124 | + testPlatform, i; | |
125 | + | |
126 | + for (i = 0; i < paramsArray.length; i++) { | |
127 | + var tmpArray = paramsArray[i].split("="); | |
128 | + params[tmpArray[0]] = tmpArray[1]; | |
129 | + } | |
130 | + | |
131 | + testPlatform = params.platform; | |
132 | + if (testPlatform) { | |
133 | + return platform.indexOf(testPlatform) != -1; | |
134 | + } | |
135 | + | |
136 | + for (j = 0, jln = platform.length; j < jln; j++) { | |
137 | + switch (platform[j]) { | |
138 | + case 'phone': | |
139 | + profileMatch = isPhone(ua); | |
140 | + break; | |
141 | + case 'tablet': | |
142 | + profileMatch = isTablet(ua); | |
143 | + break; | |
144 | + case 'desktop': | |
145 | + profileMatch = !isPhone(ua) && !isTablet(ua); | |
146 | + break; | |
147 | + case 'ios': | |
148 | + profileMatch = /(iPad|iPhone|iPod)/.test(ua); | |
149 | + break; | |
150 | + case 'android': | |
151 | + profileMatch = /(Android|Silk)/.test(ua); | |
152 | + break; | |
153 | + case 'blackberry': | |
154 | + profileMatch = /(BlackBerry|BB)/.test(ua); | |
155 | + break; | |
156 | + case 'safari': | |
157 | + profileMatch = /Safari/.test(ua) && !(/(BlackBerry|BB)/.test(ua)); | |
158 | + break; | |
159 | + case 'chrome': | |
160 | + profileMatch = /Chrome/.test(ua); | |
161 | + break; | |
162 | + case 'ie10': | |
163 | + profileMatch = /MSIE 10/.test(ua); | |
164 | + break; | |
165 | + case 'windows': | |
166 | + profileMatch = /MSIE 10/.test(ua) || /Trident/.test(ua); | |
167 | + break; | |
168 | + case 'tizen': | |
169 | + profileMatch = /Tizen/.test(ua); | |
170 | + break; | |
171 | + case 'firefox': | |
172 | + profileMatch = /Firefox/.test(ua); | |
173 | + } | |
174 | + if (profileMatch) { | |
175 | + return true; | |
176 | + } | |
177 | + } | |
178 | + return false; | |
179 | + }; | |
180 | + | |
181 | + this.css = this.css.filter(function(css) { | |
182 | + var platform = css.platform, | |
183 | + exclude = css.exclude; | |
184 | + | |
185 | + css.type = "css"; | |
186 | + | |
187 | + if (platform) { | |
188 | + if (filterPlatform(platform) && !filterPlatform(exclude)) { | |
189 | + if(!Ext.theme) { | |
190 | + Ext.theme = {}; | |
191 | + } | |
192 | + if(!Ext.theme.name) { | |
193 | + Ext.theme.name = css.theme || 'Default'; | |
194 | + } | |
195 | + return true; | |
196 | + } | |
197 | + css.filtered = true; | |
198 | + return false; | |
199 | + } | |
200 | + return true; | |
201 | + }); | |
202 | + | |
203 | + this.js = this.js.filter(function(js) { | |
204 | + var platform = js.platform, | |
205 | + exclude = js.exclude; | |
206 | + | |
207 | + js.type = "js"; | |
208 | + | |
209 | + if (platform) { | |
210 | + if (filterPlatform(platform) && !filterPlatform(exclude)) { | |
211 | + return true; | |
212 | + } | |
213 | + else { | |
214 | + js.filtered = true; | |
215 | + return false; | |
216 | + } | |
217 | + } | |
218 | + return true; | |
219 | + }); | |
220 | + | |
221 | + this.assets = this.css.concat(this.js); | |
222 | + this.getAsset = function(uri) { | |
223 | + return assetMap[uri]; | |
224 | + }; | |
225 | + this.store = function() { | |
226 | + store(key, manifestContent); | |
227 | + }; | |
228 | + } | |
229 | + | |
230 | + if (typeof global.Ext === 'undefined') { | |
231 | + var Ext = global.Ext = {}; | |
232 | + } | |
233 | + | |
234 | + function toAbsoluteUri(uri) { | |
235 | + a.href = uri; | |
236 | + return a.href; | |
237 | + } | |
238 | + | |
239 | + function addMeta(name, content) { | |
240 | + var meta = document.createElement('meta'); | |
241 | + | |
242 | + meta.setAttribute('name', name); | |
243 | + meta.setAttribute('content', content); | |
244 | + head.appendChild(meta); | |
245 | + } | |
246 | + | |
247 | + function request(uri, isShared, onSuccess, onFailure) { | |
248 | + (isShared ? requestIframe : requestXhr)(uri, onSuccess, onFailure); | |
249 | + } | |
250 | + | |
251 | + function requestXhr(uri, onSuccess, onFailure) { | |
252 | + var xhr = new XMLHttpRequest(); | |
253 | + | |
254 | + onFailure = onFailure || emptyFn; | |
255 | + | |
256 | + uri = uri + ((uri.indexOf('?') == -1) ? '?' : '&') + Date.now(); | |
257 | + | |
258 | + try { | |
259 | + xhr.open('GET', uri, true); | |
260 | + xhr.onreadystatechange = function() { | |
261 | + if (xhr.readyState == 4) { | |
262 | + var status = xhr.status, | |
263 | + content = xhr.responseText; | |
264 | + | |
265 | + if ((status >= 200 && status < 300) || status == 304 || (status == 0 && content.length > 0)) { | |
266 | + onSuccess(content); | |
267 | + } | |
268 | + else { | |
269 | + onFailure(); | |
270 | + } | |
271 | + } | |
272 | + }; | |
273 | + xhr.send(null); | |
274 | + } catch (e) { | |
275 | + onFailure(); | |
276 | + } | |
277 | + } | |
278 | + | |
279 | + function requestIframe(uri, onSuccess) { | |
280 | + var iframe = doc.createElement('iframe'); | |
281 | + | |
282 | + callbacks.push({ | |
283 | + iframe: iframe, | |
284 | + callback: onSuccess | |
285 | + }); | |
286 | + | |
287 | + iframe.src = uri + '.html'; | |
288 | + iframe.style.cssText = 'width:0;height:0;border:0;position:absolute;z-index:-999;visibility:hidden'; | |
289 | + doc.body.appendChild(iframe); | |
290 | + } | |
291 | + | |
292 | + // for remote assets, inject a script element | |
293 | + function addRemoteScript(uri, onSuccess, onFailure) { | |
294 | + var script = document.createElement('script'); | |
295 | + script.src = uri; | |
296 | + script.type = "text/javascript"; | |
297 | + script.charset = "UTF-8"; | |
298 | + | |
299 | + script.onerror = onFailure; | |
300 | + | |
301 | + if ('addEventListener' in script ) { | |
302 | + script.onload = onSuccess; | |
303 | + } else if ('readyState' in script) { | |
304 | + script.onreadystatechange = function() { | |
305 | + if (this.readyState === 'loaded' || | |
306 | + this.readyState === 'complete') { | |
307 | + onSuccess(); | |
308 | + } | |
309 | + }; | |
310 | + } else { | |
311 | + script.onload = onSuccess; | |
312 | + } | |
313 | + | |
314 | + head.appendChild(script); | |
315 | + } | |
316 | + | |
317 | + function addRemoteLink(uri) { | |
318 | + var link = document.createElement('link'); | |
319 | + link.rel = "stylesheet"; | |
320 | + link.href = uri; | |
321 | + head.appendChild(link); | |
322 | + } | |
323 | + | |
324 | + function requestAsset(asset, onSuccess, onFailure) { | |
325 | + var isRemote = !!asset.remote, | |
326 | + isShared = !!asset.shared; | |
327 | + | |
328 | + if (isRemote) { | |
329 | + if(asset.type === "js") { | |
330 | + addRemoteScript(asset.uri, function(){ | |
331 | + onSuccess(''); | |
332 | + }, onFailure); | |
333 | + } else { | |
334 | + addRemoteLink(asset.uri); | |
335 | + onSuccess(''); | |
336 | + } | |
337 | + return; | |
338 | + } | |
339 | + | |
340 | + if (!isShared && asset.version && asset.version.length) { | |
341 | + var onRequestSuccess = onSuccess, | |
342 | + version = asset.version, | |
343 | + versionLn = version.length, | |
344 | + checksumFail, checksumType; | |
345 | + | |
346 | + onSuccess = function(content) { | |
347 | + checksumType = content.substring(0, 1); | |
348 | + if (checksumType == '/') { | |
349 | + if (content.substring(2, versionLn + 2) !== version) { | |
350 | + checksumFail = true; | |
351 | + } | |
352 | + } | |
353 | + else if (checksumType == 'f') { | |
354 | + if (content.substring(10, versionLn + 10) !== version) { | |
355 | + checksumFail = true; | |
356 | + } | |
357 | + } | |
358 | + else if (checksumType == '.') { | |
359 | + if (content.substring(1, versionLn + 1) !== version) { | |
360 | + checksumFail = true; | |
361 | + } | |
362 | + } | |
363 | + if (checksumFail === true) { | |
364 | + if (confirm("Requested: '" + asset.uri + " seems to have been changed. Attempt to refresh the application?")) { | |
365 | + refresh(); | |
366 | + } | |
367 | + return; | |
368 | + } | |
369 | + onRequestSuccess(content); | |
370 | + }; | |
371 | + } | |
372 | + | |
373 | + request(asset.uri, isShared, onSuccess, onFailure); | |
374 | + } | |
375 | + | |
376 | + function onMessage(e) { | |
377 | + var data = e.data, | |
378 | + sourceWindow = e.source.window, | |
379 | + i, ln, callback, iframe; | |
380 | + | |
381 | + for (i = 0, ln = callbacks.length; i < ln; i++) { | |
382 | + callback = callbacks[i]; | |
383 | + iframe = callback.iframe; | |
384 | + | |
385 | + if (iframe.contentWindow === sourceWindow) { | |
386 | + callback.callback(data); | |
387 | + doc.body.removeChild(iframe); | |
388 | + callbacks.splice(i, 1); | |
389 | + return; | |
390 | + } | |
391 | + } | |
392 | + } | |
393 | + | |
394 | + function patch(content, delta) { | |
395 | + var output = [], | |
396 | + chunk, i, ln; | |
397 | + | |
398 | + if (delta.length === 0) { | |
399 | + return content; | |
400 | + } | |
401 | + | |
402 | + for (i = 0,ln = delta.length; i < ln; i++) { | |
403 | + chunk = delta[i]; | |
404 | + | |
405 | + if (typeof chunk === 'number') { | |
406 | + output.push(content.substring(chunk, chunk + delta[++i])); | |
407 | + } | |
408 | + else { | |
409 | + output.push(chunk); | |
410 | + } | |
411 | + } | |
412 | + | |
413 | + return output.join(''); | |
414 | + } | |
415 | + | |
416 | + function log(message) { | |
417 | + if (typeof console != 'undefined') { | |
418 | + (console.error || console.log).call(console, message); | |
419 | + } | |
420 | + } | |
421 | + | |
422 | + function store(key, value) { | |
423 | + try { | |
424 | + storage.setItem(key, value); | |
425 | + } | |
426 | + catch (e) { | |
427 | + if (storage && e.code == e.QUOTA_EXCEEDED_ERR && activeManifest) { | |
428 | + log("LocalStorage Quota exceeded, cannot store " + key + " locally"); | |
429 | + // Quota exceeded, clean up unused items | |
430 | +// var items = activeManifest.assets.map(function(asset) { | |
431 | +// return asset.key; | |
432 | +// }), | |
433 | +// i = 0, | |
434 | +// ln = storage.length, | |
435 | +// cleaned = false, | |
436 | +// item; | |
437 | +// | |
438 | +// items.push(activeManifest.key); | |
439 | +// | |
440 | +// while (i <= ln - 1) { | |
441 | +// item = storage.key(i); | |
442 | +// | |
443 | +// if (items.indexOf(item) == -1) { | |
444 | +// storage.removeItem(item); | |
445 | +// cleaned = true; | |
446 | +// ln--; | |
447 | +// } | |
448 | +// else { | |
449 | +// i++; | |
450 | +// } | |
451 | +// } | |
452 | + | |
453 | + // Done cleaning up, attempt to store the value again | |
454 | + // If there's still not enough space, no other choice | |
455 | + // but to skip this item from being stored | |
456 | +// if (cleaned) { | |
457 | +// store(key, value); | |
458 | +// } | |
459 | + } | |
460 | + } | |
461 | + } | |
462 | + | |
463 | + function retrieve(key) { | |
464 | + try { | |
465 | + return storage.getItem(key); | |
466 | + } | |
467 | + catch (e) { | |
468 | + // Private browsing mode | |
469 | + return null; | |
470 | + } | |
471 | + } | |
472 | + | |
473 | + function retrieveAsset(asset) { | |
474 | + return retrieve(asset.key); | |
475 | + } | |
476 | + | |
477 | + function storeAsset(asset, content) { | |
478 | + return store(asset.key, content); | |
479 | + } | |
480 | + | |
481 | + function refresh() { | |
482 | + if (!isRefreshing) { | |
483 | + isRefreshing = true; | |
484 | + requestXhr(manifestFile, function(content) { | |
485 | + new Manifest(content).store(); | |
486 | + global.location.reload(); | |
487 | + }); | |
488 | + } | |
489 | + } | |
490 | + | |
491 | + function blink(currentManifest) { | |
492 | + var currentAssets = currentManifest.assets, | |
493 | + assetsCount = currentAssets.length, | |
494 | + newManifest; | |
495 | + | |
496 | + activeManifest = currentManifest; | |
497 | + | |
498 | + addWindowListener('message', onMessage, false); | |
499 | + | |
500 | + function onAssetReady(asset, content) { | |
501 | + var assets = asset.collection, | |
502 | + index = asset.index, | |
503 | + ln = assets.length, | |
504 | + i; | |
505 | + | |
506 | + asset.ready = true; | |
507 | + asset.content = content; | |
508 | + | |
509 | + for (i = index - 1; i >= 0; i--) { | |
510 | + asset = assets[i]; | |
511 | + if (!asset.filtered && (!asset.ready || !asset.evaluated)) { | |
512 | + return; | |
513 | + } | |
514 | + } | |
515 | + | |
516 | + for (i = index; i < ln; i++) { | |
517 | + asset = assets[i]; | |
518 | + if (asset.ready) { | |
519 | + if (!asset.evaluated) { | |
520 | + evaluateAsset(asset); | |
521 | + } | |
522 | + } | |
523 | + else { | |
524 | + return; | |
525 | + } | |
526 | + } | |
527 | + } | |
528 | + | |
529 | + function evaluateAsset(asset) { | |
530 | + asset.evaluated = true; | |
531 | + | |
532 | + if (asset.type == 'js') { | |
533 | + try { | |
534 | + eval(asset.content); | |
535 | + } | |
536 | + catch (e) { | |
537 | + log("Error evaluating " + asset.uri + " with message: " + e); | |
538 | + } | |
539 | + } | |
540 | + else { | |
541 | + var style = doc.createElement('style'), | |
542 | + base; | |
543 | + | |
544 | + style.type = 'text/css'; | |
545 | + style.textContent = asset.content; | |
546 | + | |
547 | + if ('id' in asset) { | |
548 | + style.id = asset.id; | |
549 | + } | |
550 | + | |
551 | + if ('disabled' in asset) { | |
552 | + style.disabled = asset.disabled; | |
553 | + } | |
554 | + | |
555 | + base = document.createElement('base'); | |
556 | + base.href = asset.path.replace(/\/[^\/]*$/, '/'); | |
557 | + head.appendChild(base); | |
558 | + head.appendChild(style); | |
559 | + head.removeChild(base); | |
560 | + } | |
561 | + | |
562 | + delete asset.content; | |
563 | + | |
564 | + if (--assetsCount == 0) { | |
565 | + onReady(); | |
566 | + } | |
567 | + } | |
568 | + | |
569 | + function onReady() { | |
570 | + var updatingAssets = [], | |
571 | + appCacheReady = false, | |
572 | + onAppCacheIdle = function() {}, | |
573 | + onAppCacheReady = function() { | |
574 | + appCache.swapCache(); | |
575 | + appCacheReady = true; | |
576 | + onAppCacheIdle(); | |
577 | + }, | |
578 | + updatingCount; | |
579 | + | |
580 | + removeWindowListener('message', onMessage, false); | |
581 | + | |
582 | + if (appCache.status == appCache.UPDATEREADY) { | |
583 | + onAppCacheReady(); | |
584 | + } | |
585 | + else if (appCache.status == appCache.CHECKING || appCache.status == appCache.DOWNLOADING) { | |
586 | + appCache.onupdateready = onAppCacheReady; | |
587 | + appCache.onnoupdate = appCache.onobsolete = function() { | |
588 | + onAppCacheIdle(); | |
589 | + }; | |
590 | + } | |
591 | + | |
592 | + function notifyUpdateIfAppCacheReady() { | |
593 | + if (appCacheReady) { | |
594 | + notifyUpdate(); | |
595 | + } | |
596 | + } | |
597 | + | |
598 | + function notifyUpdate() { | |
599 | + var updatedCallback = Ext.onUpdated || emptyFn; | |
600 | + | |
601 | + if ('onSetup' in Ext) { | |
602 | + Ext.onSetup(updatedCallback); | |
603 | + } | |
604 | + else { | |
605 | + updatedCallback(); | |
606 | + } | |
607 | + } | |
608 | + | |
609 | + function doUpdate() { | |
610 | + newManifest.store(); | |
611 | + | |
612 | + updatingAssets.forEach(function(asset) { | |
613 | + storeAsset(asset, asset.content); | |
614 | + }); | |
615 | + | |
616 | + notifyUpdate(); | |
617 | + } | |
618 | + | |
619 | + function onAssetUpdated(asset, content) { | |
620 | + asset.content = content; | |
621 | + | |
622 | + if (--updatingCount == 0) { | |
623 | + if (appCache.status == appCache.IDLE) { | |
624 | + doUpdate(); | |
625 | + } | |
626 | + else { | |
627 | + onAppCacheIdle = doUpdate; | |
628 | + } | |
629 | + } | |
630 | + } | |
631 | + | |
632 | + function checkForUpdate() { | |
633 | + removeWindowListener('online', checkForUpdate, false); | |
634 | + requestXhr(manifestFile, function(manifestContent) { | |
635 | + activeManifest = newManifest = new Manifest(manifestContent); | |
636 | + | |
637 | + var assets = newManifest.assets, | |
638 | + currentAsset; | |
639 | + | |
640 | + assets.forEach(function(asset) { | |
641 | + currentAsset = currentManifest.getAsset(asset.uri); | |
642 | + | |
643 | + if (!currentAsset || asset.version !== currentAsset.version) { | |
644 | + updatingAssets.push(asset); | |
645 | + } | |
646 | + }); | |
647 | + | |
648 | + updatingCount = updatingAssets.length; | |
649 | + | |
650 | + if (updatingCount == 0) { | |
651 | + if (appCache.status == appCache.IDLE) { | |
652 | + notifyUpdateIfAppCacheReady(); | |
653 | + } | |
654 | + else { | |
655 | + onAppCacheIdle = notifyUpdateIfAppCacheReady; | |
656 | + } | |
657 | + return; | |
658 | + } | |
659 | + | |
660 | + updatingAssets.forEach(function(asset) { | |
661 | + var currentAsset = currentManifest.getAsset(asset.uri), | |
662 | + path = asset.path, | |
663 | + update = asset.update; | |
664 | + | |
665 | + function updateFull() { | |
666 | + requestAsset(asset, function(content) { | |
667 | + onAssetUpdated(asset, content); | |
668 | + }); | |
669 | + } | |
670 | + | |
671 | + // New asset (never used before) | |
672 | + // OR Shared from CDN | |
673 | + // OR Missing local storage | |
674 | + // OR Full update | |
675 | + if (!currentAsset || !update || retrieveAsset(asset) === null || update != 'delta') { | |
676 | + updateFull(); | |
677 | + } | |
678 | + else { | |
679 | + requestXhr('deltas/' + path + '/' + currentAsset.version + '.json', | |
680 | + function(content) { | |
681 | + try { | |
682 | + onAssetUpdated(asset, patch(retrieveAsset(asset), jsonParse(content))); | |
683 | + } | |
684 | + catch (e) { | |
685 | + log("Malformed delta content received for " + asset.uri); | |
686 | + } | |
687 | + }, | |
688 | + updateFull | |
689 | + ); | |
690 | + } | |
691 | + }) | |
692 | + }); | |
693 | + } | |
694 | + | |
695 | + if (navigator.onLine !== false) { | |
696 | + checkForUpdate(); | |
697 | + } | |
698 | + else { | |
699 | + addWindowListener('online', checkForUpdate, false); | |
700 | + } | |
701 | + } | |
702 | + | |
703 | + if (assetsCount == 0) { | |
704 | + onReady(); | |
705 | + return; | |
706 | + } | |
707 | + | |
708 | + currentAssets.forEach(function(asset) { | |
709 | + var content = retrieveAsset(asset); | |
710 | + | |
711 | + if (content === null) { | |
712 | + requestAsset(asset, function(content) { | |
713 | + if (!asset.remote) { | |
714 | + storeAsset(asset, content); | |
715 | + } | |
716 | + onAssetReady(asset, content); | |
717 | + }, function() { | |
718 | + onAssetReady(asset, ''); | |
719 | + }); | |
720 | + } | |
721 | + else { | |
722 | + onAssetReady(asset, content); | |
723 | + } | |
724 | + }); | |
725 | + } | |
726 | + | |
727 | + function blinkOnDomReady(manifest) { | |
728 | + if (navigator.userAgent.match(/IEMobile\/10\.0/)) { | |
729 | + var msViewportStyle = document.createElement("style"); | |
730 | + msViewportStyle.appendChild( | |
731 | + document.createTextNode( | |
732 | + "@media screen and (orientation: portrait) {" + | |
733 | + "@-ms-viewport {width: 320px !important;}" + | |
734 | + "}" + | |
735 | + "@media screen and (orientation: landscape) {" + | |
736 | + "@-ms-viewport {width: 560px !important;}" + | |
737 | + "}" | |
738 | + ) | |
739 | + ); | |
740 | + document.getElementsByTagName("head")[0].appendChild(msViewportStyle); | |
741 | + } | |
742 | + | |
743 | + var readyStateRe = (/MSIE 10/.test(navigator.userAgent)) ? /complete|loaded/ : /interactive|complete|loaded/; | |
744 | + if (doc.readyState.match(readyStateRe) !== null) { | |
745 | + blink(manifest); | |
746 | + } | |
747 | + else { | |
748 | + addWindowListener('DOMContentLoaded', function() { | |
749 | + if (navigator.standalone) { | |
750 | + // When running from Home Screen, the splash screen will not disappear until all | |
751 | + // external resource requests finish. | |
752 | + // The first timeout clears the splash screen | |
753 | + // The second timeout allows inital HTML content to be displayed | |
754 | + setTimeout(function() { | |
755 | + setTimeout(function() { | |
756 | + blink(manifest); | |
757 | + }, 1); | |
758 | + }, 1); | |
759 | + } | |
760 | + else { | |
761 | + setTimeout(function() { | |
762 | + blink(manifest); | |
763 | + }, 1); | |
764 | + } | |
765 | + }, false); | |
766 | + } | |
767 | + } | |
768 | + | |
769 | + Ext.blink = function(manifest) { | |
770 | + var manifestContent = retrieve(getManifestStorageKey(manifest.id)); | |
771 | + | |
772 | + addMeta('viewport', 'width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no'); | |
773 | + addMeta('apple-mobile-web-app-capable', 'yes'); | |
774 | + addMeta('apple-touch-fullscreen', 'yes'); | |
775 | + | |
776 | + if (manifestContent) { | |
777 | + manifest = new Manifest(manifestContent); | |
778 | + blinkOnDomReady(manifest); | |
779 | + } | |
780 | + else { | |
781 | + requestXhr(manifestFile, function(content) { | |
782 | + manifest = new Manifest(content); | |
783 | + manifest.store(); | |
784 | + blinkOnDomReady(manifest); | |
785 | + }); | |
786 | + } | |
787 | + }; | |
788 | +})(this); | |
0 | 789 | \ No newline at end of file |
... | ... |
... | ... | @@ -0,0 +1,180 @@ |
1 | +/** | |
2 | + * Sencha Blink - Testing | |
3 | + * @author Jacky Nguyen <jacky@sencha.com> | |
4 | + */ | |
5 | +(function(global) { | |
6 | + var head = global.document.head || global.document.getElementsByTagName('head')[0], | |
7 | + Ext = global.Ext; | |
8 | + | |
9 | + if (typeof Ext == 'undefined') { | |
10 | + global.Ext = Ext = {}; | |
11 | + } | |
12 | + | |
13 | + function write(content) { | |
14 | + document.write(content); | |
15 | + } | |
16 | + | |
17 | + function addMeta(name, content) { | |
18 | + var meta = document.createElement('meta'); | |
19 | + | |
20 | + meta.setAttribute('name', name); | |
21 | + meta.setAttribute('content', content); | |
22 | + head.appendChild(meta); | |
23 | + } | |
24 | + | |
25 | + Ext.blink = function(options) { | |
26 | + var scripts = options.js || [], | |
27 | + styleSheets = options.css || [], | |
28 | + i, ln, path, platform, theme, exclude; | |
29 | + | |
30 | + if (navigator.userAgent.match(/IEMobile\/10\.0/)) { | |
31 | + var msViewportStyle = document.createElement("style"); | |
32 | + msViewportStyle.appendChild( | |
33 | + document.createTextNode( | |
34 | + "@media screen and (orientation: portrait) {" + | |
35 | + "@-ms-viewport {width: 320px !important;}" + | |
36 | + "}" + | |
37 | + "@media screen and (orientation: landscape) {" + | |
38 | + "@-ms-viewport {width: 560px !important;}" + | |
39 | + "}" | |
40 | + ) | |
41 | + ); | |
42 | + document.getElementsByTagName("head")[0].appendChild(msViewportStyle); | |
43 | + } | |
44 | + addMeta('viewport', 'width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no'); | |
45 | + addMeta('apple-mobile-web-app-capable', 'yes'); | |
46 | + addMeta('apple-touch-fullscreen', 'yes'); | |
47 | + | |
48 | + Ext.microloaded = true; | |
49 | + | |
50 | + var filterPlatform = window.Ext.filterPlatform = function(platform) { | |
51 | + var profileMatch = false, | |
52 | + ua = navigator.userAgent, | |
53 | + j, jln; | |
54 | + | |
55 | + platform = [].concat(platform); | |
56 | + | |
57 | + function isPhone(ua) { | |
58 | + var isMobile = /Mobile(\/|\s)/.test(ua); | |
59 | + | |
60 | + // Either: | |
61 | + // - iOS but not iPad | |
62 | + // - Android 2 | |
63 | + // - Android with "Mobile" in the UA | |
64 | + | |
65 | + return /(iPhone|iPod)/.test(ua) || | |
66 | + (!/(Silk)/.test(ua) && (/(Android)/.test(ua) && (/(Android 2)/.test(ua) || isMobile))) || | |
67 | + (/(BlackBerry|BB)/.test(ua) && isMobile) || | |
68 | + /(Windows Phone)/.test(ua); | |
69 | + } | |
70 | + | |
71 | + function isTablet(ua) { | |
72 | + return !isPhone(ua) && (/iPad/.test(ua) || /Android|Silk/.test(ua) || /(RIM Tablet OS)/.test(ua) || | |
73 | + (/MSIE 10/.test(ua) && /; Touch/.test(ua))); | |
74 | + } | |
75 | + | |
76 | + // Check if the ?platform parameter is set in the URL | |
77 | + var paramsString = window.location.search.substr(1), | |
78 | + paramsArray = paramsString.split("&"), | |
79 | + params = {}, | |
80 | + testPlatform, i; | |
81 | + | |
82 | + for (i = 0; i < paramsArray.length; i++) { | |
83 | + var tmpArray = paramsArray[i].split("="); | |
84 | + params[tmpArray[0]] = tmpArray[1]; | |
85 | + } | |
86 | + | |
87 | + testPlatform = params.platform; | |
88 | + if (testPlatform) { | |
89 | + return platform.indexOf(testPlatform) != -1; | |
90 | + } | |
91 | + | |
92 | + for (j = 0, jln = platform.length; j < jln; j++) { | |
93 | + switch (platform[j]) { | |
94 | + case 'phone': | |
95 | + profileMatch = isPhone(ua); | |
96 | + break; | |
97 | + case 'tablet': | |
98 | + profileMatch = isTablet(ua); | |
99 | + break; | |
100 | + case 'desktop': | |
101 | + profileMatch = !isPhone(ua) && !isTablet(ua); | |
102 | + break; | |
103 | + case 'ios': | |
104 | + profileMatch = /(iPad|iPhone|iPod)/.test(ua); | |
105 | + break; | |
106 | + case 'android': | |
107 | + profileMatch = /(Android|Silk)/.test(ua); | |
108 | + break; | |
109 | + case 'blackberry': | |
110 | + profileMatch = /(BlackBerry|BB)/.test(ua); | |
111 | + break; | |
112 | + case 'safari': | |
113 | + profileMatch = /Safari/.test(ua) && !(/(BlackBerry|BB)/.test(ua)); | |
114 | + break; | |
115 | + case 'chrome': | |
116 | + profileMatch = /Chrome/.test(ua); | |
117 | + break; | |
118 | + case 'ie10': | |
119 | + profileMatch = /MSIE 10/.test(ua); | |
120 | + break; | |
121 | + case 'windows': | |
122 | + profileMatch = /MSIE 10/.test(ua) || /Trident/.test(ua); | |
123 | + break; | |
124 | + case 'tizen': | |
125 | + profileMatch = /Tizen/.test(ua); | |
126 | + break; | |
127 | + case 'firefox': | |
128 | + profileMatch = /Firefox/.test(ua); | |
129 | + } | |
130 | + if (profileMatch) { | |
131 | + return true; | |
132 | + } | |
133 | + } | |
134 | + return false; | |
135 | + }; | |
136 | + | |
137 | + for (i = 0,ln = styleSheets.length; i < ln; i++) { | |
138 | + path = styleSheets[i]; | |
139 | + | |
140 | + if (typeof path != 'string') { | |
141 | + platform = path.platform; | |
142 | + exclude = path.exclude; | |
143 | + theme = path.theme; | |
144 | + path = path.path; | |
145 | + } | |
146 | + | |
147 | + if (platform) { | |
148 | + if (!filterPlatform(platform) || filterPlatform(exclude)) { | |
149 | + continue; | |
150 | + } | |
151 | + if(!Ext.theme) { | |
152 | + Ext.theme = {}; | |
153 | + } | |
154 | + if(!Ext.theme.name) { | |
155 | + Ext.theme.name = theme || 'Default'; | |
156 | + } | |
157 | + } | |
158 | + write('<link rel="stylesheet" href="'+path+'">'); | |
159 | + } | |
160 | + | |
161 | + for (i = 0,ln = scripts.length; i < ln; i++) { | |
162 | + path = scripts[i]; | |
163 | + | |
164 | + if (typeof path != 'string') { | |
165 | + platform = path.platform; | |
166 | + exclude = path.exclude; | |
167 | + path = path.path; | |
168 | + } | |
169 | + | |
170 | + if (platform) { | |
171 | + if (!filterPlatform(platform) || filterPlatform(exclude)) { | |
172 | + continue; | |
173 | + } | |
174 | + } | |
175 | + | |
176 | + write('<script src="'+path+'"></'+'script>'); | |
177 | + } | |
178 | + } | |
179 | + | |
180 | +})(this); | |
0 | 181 | \ No newline at end of file |
... | ... |
... | ... | @@ -0,0 +1,28 @@ |
1 | +# ============================================================================= | |
2 | +# This file defines default property values that apply to the "native" build | |
3 | +# environment. | |
4 | +# | |
5 | +# Please use native.properties to customize these properties unless you want | |
6 | +# your customizations to be for all environments. In that case, you can instead | |
7 | +# override these properties in build.properties. | |
8 | +# | |
9 | +# The properties defined in this file take priority over defaults.properties | |
10 | +# but are lower priority than build.properties which in turn is lower priority | |
11 | +# than native.properties. | |
12 | +# | |
13 | +# IMPORTANT - This file should not be modified by an app as it is overwritten | |
14 | +# during each app upgrade. | |
15 | +# ============================================================================= | |
16 | + | |
17 | +build.options.logger=no | |
18 | + | |
19 | +build.options.debug=false | |
20 | + | |
21 | +# enable yui compression | |
22 | +build.compression.yui=1 | |
23 | + | |
24 | +enable.standalone.manifest=true | |
25 | + | |
26 | +app.microloader.name=testing.js | |
27 | + | |
28 | +skip.native-package=false | |
... | ... |
... | ... | @@ -0,0 +1,8 @@ |
1 | +# ============================================================================= | |
2 | +# This file provides an override point for default variables defined in | |
3 | +# native.defaults.properties. These properties are only imported when building | |
4 | +# for the "native" environment. | |
5 | +# | |
6 | +# Properties defined in this file take priority over build.properties but are | |
7 | +# only loaded for "native" builds. | |
8 | +# ============================================================================= | |
... | ... |
... | ... | @@ -0,0 +1,27 @@ |
1 | +# ============================================================================= | |
2 | +# This file defines default property values that apply to the "package" build | |
3 | +# environment. | |
4 | +# | |
5 | +# Please use package.properties to customize these properties unless you want | |
6 | +# your customizations to be for all environments. In that case, you can instead | |
7 | +# override these properties in build.properties. | |
8 | +# | |
9 | +# The properties defined in this file take priority over defaults.properties | |
10 | +# but are lower priority than build.properties which in turn is lower priority | |
11 | +# than package.properties. | |
12 | +# | |
13 | +# IMPORTANT - This file should not be modified by an app as it is overwritten | |
14 | +# during each app upgrade. | |
15 | +# | |
16 | +# NOTE: This use of "package" applies to native packaged application, not a | |
17 | +# Package in the general since of code libraries. | |
18 | +# ============================================================================= | |
19 | + | |
20 | +build.options.logger=no | |
21 | + | |
22 | +build.options.debug=false | |
23 | + | |
24 | +# enable yui compression | |
25 | +build.compression.yui=1 | |
26 | + | |
27 | +app.microloader.name=testing.js | |
... | ... |
... | ... | @@ -0,0 +1,11 @@ |
1 | +# ============================================================================= | |
2 | +# This file provides an override point for default variables defined in | |
3 | +# package.defaults.properties. These properties are only imported when building | |
4 | +# for the "package" environment. | |
5 | +# | |
6 | +# Properties defined in this file take priority over build.properties but are | |
7 | +# only loaded for "package" builds. | |
8 | +# | |
9 | +# NOTE: This use of "package" applies to native packaged application, not a | |
10 | +# Package in the general since of code libraries. | |
11 | +# ============================================================================= | |
... | ... |
... | ... | @@ -0,0 +1,127 @@ |
1 | +<project name="packager-impl"> | |
2 | + <macrodef name="x-run-mobile-packager"> | |
3 | + <attribute name="configfile"/> | |
4 | + <attribute name="action"/> | |
5 | + <sequential> | |
6 | + <echo>Running mobile packager action @{action} on file @{configFile}</echo> | |
7 | + <x-sencha-command dir="${app.dir}" inheritall="true"> | |
8 | + <![CDATA[ | |
9 | + app | |
10 | + package | |
11 | + @{action} | |
12 | + -path=@{configfile} | |
13 | + ]]> | |
14 | + </x-sencha-command> | |
15 | + </sequential> | |
16 | + </macrodef> | |
17 | + | |
18 | + | |
19 | + <macrodef name="x-run-mobile-packager-config"> | |
20 | + <attribute name="config"/> | |
21 | + <attribute name="run" default="${args.autorun}"/> | |
22 | + <sequential> | |
23 | + <if> | |
24 | + <not> | |
25 | + <available file="@{config}"/> | |
26 | + </not> | |
27 | + <then> | |
28 | + <!-- | |
29 | + if the input packager config file for stbuild is | |
30 | + not available, then create it | |
31 | + --> | |
32 | + <echo><![CDATA[ | |
33 | + Creating default mobile packager config file at : | |
34 | + @{config} | |
35 | + ]]></echo> | |
36 | + <x-run-mobile-packager | |
37 | + configfile="@{config}" | |
38 | + action="generate"/> | |
39 | + </then> | |
40 | + </if> | |
41 | + | |
42 | + <local name="local.build.mobile.out.dir"/> | |
43 | + <local name="local.build.mobile.config.name"/> | |
44 | + | |
45 | + <!-- | |
46 | + append the current config file name to the output directory | |
47 | + for mobile packages. this allows multiple config outputs to | |
48 | + be sandboxed by the name of the config file in the mobile | |
49 | + package output directory. | |
50 | + --> | |
51 | + <basename file="@{config}" property="local.build.mobile.config.name"/> | |
52 | + <property name="local.build.mobile.out.dir" | |
53 | + value="${build.mobile.packager.out.dir}/${local.build.mobile.config.name}"/> | |
54 | + | |
55 | + <!-- | |
56 | + duplicate the config file, so that we can set the | |
57 | + input and output properties w/o losing comment blocks | |
58 | + --> | |
59 | + <x-set-json-property file="@{config}" | |
60 | + tofile="${build.mobile.packager.temp.file}"> | |
61 | + <property name="inputPath" | |
62 | + value="${build.mobile.packager.in.dir}"/> | |
63 | + <property name="outputPath" | |
64 | + value="${local.build.mobile.out.dir}"/> | |
65 | + </x-set-json-property> | |
66 | + | |
67 | +<echo><![CDATA[ | |
68 | + Processing Mobile Packager config file | |
69 | + config: @{config} | |
70 | + inputPath: ${build.mobile.packager.in.dir} | |
71 | + outputPath: ${local.build.mobile.out.dir} | |
72 | +]]></echo> | |
73 | + | |
74 | + <local name="mobile.packager.platform"/> | |
75 | + | |
76 | + <x-load-properties file="${build.mobile.packager.temp.file}" | |
77 | + prefix="mobile.packager" | |
78 | + required="true"/> | |
79 | + | |
80 | + <if> | |
81 | + <contains string="${mobile.packager.platform}" substring="iOS"/> | |
82 | + <then> | |
83 | + <copy todir="${build.dir}"> | |
84 | + <fileset dir="${app.dir}/resources/icons" includes="**/*"/> | |
85 | + <fileset dir="${app.dir}/resources/loading" includes="**/*"/> | |
86 | + </copy> | |
87 | + </then> | |
88 | + </if> | |
89 | + | |
90 | + <local name="build.mobile.action"/> | |
91 | + <condition property="build.mobile.action" value="run"> | |
92 | + <x-is-true value="@{run}"/> | |
93 | + </condition> | |
94 | + <property name="build.mobile.action" value="build"/> | |
95 | + | |
96 | + <x-run-mobile-packager | |
97 | + configFile="${build.mobile.packager.temp.file}" | |
98 | + action="${build.mobile.action}"/> | |
99 | + </sequential> | |
100 | + </macrodef> | |
101 | + | |
102 | + <target name="-native-package-mobile"> | |
103 | + <if> | |
104 | + <x-is-true value="${args.autorun}"/> | |
105 | + <then> | |
106 | + <echo>Running default mobile packager config.</echo> | |
107 | + <x-run-mobile-packager-config config="${build.mobile.packager.default.file}" | |
108 | + run="true"/> | |
109 | + </then> | |
110 | + <else> | |
111 | + <echo>Building all specified mobile packager configs.</echo> | |
112 | + <for param="configfile" list="${build.mobile.packager.file}"> | |
113 | + <sequential> | |
114 | + <x-run-mobile-packager-config config="@{configfile}" run="false"/> | |
115 | + </sequential> | |
116 | + </for> | |
117 | + </else> | |
118 | + </if> | |
119 | + </target> | |
120 | + | |
121 | + <target name="-before-native-package"/> | |
122 | + <target name="-native-package" | |
123 | + depends="-native-package-mobile"> | |
124 | + </target> | |
125 | + <target name="-after-native-package"/> | |
126 | + | |
127 | +</project> | |
0 | 128 | \ No newline at end of file |
... | ... |
... | ... | @@ -0,0 +1,186 @@ |
1 | +<project name="page-impl.xml"> | |
2 | + <target name="-build-output-microload-page"> | |
3 | + <if> | |
4 | + <x-is-true value="${build.enable.embedded.manifest}"/> | |
5 | + <then> | |
6 | + <x-compile refid="${compiler.ref.id}"> | |
7 | + <![CDATA[ | |
8 | + # generate microloader file | |
9 | + microload | |
10 | + -operation=microloader | |
11 | + -microloaderPath=${app.microloader.path} | |
12 | + -tpl=${build.microloader.code.tpl} | |
13 | + -out=${build.microloader.path} | |
14 | + and | |
15 | + # generate json file | |
16 | + microload | |
17 | + -operation=json | |
18 | + -append | |
19 | + -tpl=${build.microloader.json.tpl.embedded} | |
20 | + -out=${build.microloader.path} | |
21 | + ]]> | |
22 | + </x-compile> | |
23 | + </then> | |
24 | + <else> | |
25 | + <x-compile refid="${compiler.ref.id}"> | |
26 | + <![CDATA[ | |
27 | + # generate json file | |
28 | + microload | |
29 | + -operation=json | |
30 | + -tpl=${build.microloader.json.tpl.standalone} | |
31 | + -out=${build.out.json.path} | |
32 | + and | |
33 | + # generate microloader file | |
34 | + microload | |
35 | + -operation=microloader | |
36 | + -microloaderPath=${app.microloader.path} | |
37 | + -tpl=${build.microloader.code.tpl} | |
38 | + -out=${build.microloader.path} | |
39 | + and | |
40 | + microload | |
41 | + -operation=json | |
42 | + -append | |
43 | + -tpl=${build.microloader.json.tpl.external} | |
44 | + -out=${build.microloader.path} | |
45 | + ]]> | |
46 | + </x-compile> | |
47 | + </else> | |
48 | + </if> | |
49 | + | |
50 | + <if> | |
51 | + <x-is-true value="${build.enable.embedded.microloader}"/> | |
52 | + <then> | |
53 | + <x-sencha-command dir="${app.dir}" inheritall="true"> | |
54 | + <![CDATA[ | |
55 | + fs | |
56 | + minify | |
57 | + ${build.embedded.microloader.compressor} | |
58 | + -from=${build.microloader.path} | |
59 | + -to=${build.microloader.path} | |
60 | + ]]> | |
61 | + </x-sencha-command> | |
62 | + <x-compile refid="${compiler.ref.id}"> | |
63 | + <![CDATA[ | |
64 | + markup | |
65 | + -contentFile=${build.microloader.path} | |
66 | + -tpl=${build.embedded.microloader.tpl} | |
67 | + -out=${build.out.page.path} | |
68 | + ]]> | |
69 | + </x-compile> | |
70 | + | |
71 | + <!--once the generated microloader file is embedded, delete it--> | |
72 | + <delete file="${build.microloader.path}"/> | |
73 | + </then> | |
74 | + <else> | |
75 | + <x-compile refid="${compiler.ref.id}"> | |
76 | + <![CDATA[ | |
77 | + markup | |
78 | + -markup=${build.external.microloader.markup} | |
79 | + -out=${build.out.page.path} | |
80 | + ]]> | |
81 | + </x-compile> | |
82 | + </else> | |
83 | + </if> | |
84 | + | |
85 | + </target> | |
86 | + | |
87 | + <!-- generates a separate json manifest for use with native packager --> | |
88 | + <target name="-build-standalone-json-manifest"> | |
89 | + <x-run-if-true value="${enable.standalone.manifest}"> | |
90 | + <x-compile refid="${compiler.ref.id}"> | |
91 | + <![CDATA[ | |
92 | + # generate json file | |
93 | + microload | |
94 | + -operation=json | |
95 | + -tpl=${build.microloader.json.tpl.standalone} | |
96 | + -out=${build.out.json.path} | |
97 | + ]]> | |
98 | + </x-compile> | |
99 | + </x-run-if-true> | |
100 | + </target> | |
101 | + | |
102 | + <target name="-build-output-markup-page"> | |
103 | + <condition property="internal.app.css.rel" value="${app.out.css.rel}"> | |
104 | + <x-is-true value="${enable.ext42.themes}"/> | |
105 | + </condition> | |
106 | + <property name="internal.app.css.rel" value=""/> | |
107 | + | |
108 | + <x-compile refid="${compiler.ref.id}"> | |
109 | + <![CDATA[ | |
110 | + markup | |
111 | + -out=${build.out.page.path} | |
112 | + ]]> | |
113 | + </x-compile> | |
114 | + </target> | |
115 | + | |
116 | + <!-- '-detect-app-build-properties' is defined in js-impl.xml --> | |
117 | + <target name="-build-output-page" | |
118 | + depends="-detect-app-build-properties,-build-standalone-json-manifest"> | |
119 | + <if> | |
120 | + <x-is-true value="${build.output.markuponly}"/> | |
121 | + <then> | |
122 | + <x-ant-call target="-build-output-markup-page"/> | |
123 | + </then> | |
124 | + <else> | |
125 | + <x-ant-call target="-build-output-microload-page"/> | |
126 | + </else> | |
127 | + </if> | |
128 | + </target> | |
129 | + | |
130 | + <target name="-copy-app-resources" depends="-init-compiler"> | |
131 | + <x-compile refid="${compiler.ref.id}"> | |
132 | + <![CDATA[ | |
133 | + app-resources | |
134 | + -compress=${enable.resource.compression} | |
135 | + -out=${build.dir} | |
136 | + ]]> | |
137 | + </x-compile> | |
138 | + </target> | |
139 | + | |
140 | + <target name="-generate-deltas" depends="-init-compiler"> | |
141 | + <if> | |
142 | + <and> | |
143 | + <x-is-true value="${enable.deltas}"/> | |
144 | + <x-is-false value="${build.output.markuponly}"/> | |
145 | + </and> | |
146 | + <then> | |
147 | + <x-compile refid="${compiler.ref.id}"> | |
148 | + <![CDATA[ | |
149 | + deltas | |
150 | + -archivePath=${build.out.archive.path} | |
151 | + -deltaPath=${build.out.delta.path} | |
152 | + -resourcePath=${build.dir} | |
153 | + ]]> | |
154 | + </x-compile> | |
155 | + </then> | |
156 | + </if> | |
157 | + </target> | |
158 | + | |
159 | + <target name="-generate-cache-manifest" depends="-init-compiler"> | |
160 | + <if> | |
161 | + <and> | |
162 | + <x-is-true value="${enable.cache.manifest}"/> | |
163 | + <x-is-false value="${build.output.markuponly}"/> | |
164 | + </and> | |
165 | + <then> | |
166 | + <x-compile refid="${compiler.ref.id}"> | |
167 | + <![CDATA[ | |
168 | + cache-manifest | |
169 | + -cacheManifestPath=${build.manifest.path} | |
170 | + ]]> | |
171 | + </x-compile> | |
172 | + <replace file="${build.out.page.path}" | |
173 | + token="<html manifest=""" | |
174 | + value="<html manifest="${build.manifest.name}""/> | |
175 | + </then> | |
176 | + </if> | |
177 | + </target> | |
178 | + | |
179 | + <target name="-before-page"/> | |
180 | + <target name="-page" | |
181 | + depends="-copy-app-resources, | |
182 | + -generate-deltas, | |
183 | + -build-output-page, | |
184 | + -generate-cache-manifest"/> | |
185 | + <target name="-after-page"/> | |
186 | +</project> | |
0 | 187 | \ No newline at end of file |
... | ... |
... | ... | @@ -0,0 +1,32 @@ |
1 | +<project basedir="."> | |
2 | + <!-- | |
3 | + This file can be freely edited, so long as the <import file="${sencha.workspace.config.dir}/plugin.xml"/> | |
4 | + statement is not removed. | |
5 | + | |
6 | + One of the purposes of this file is to hook various Sencha Command operations and do | |
7 | + processing before or after the command is processed. To do this, simply provide the | |
8 | + logic in a <target> using one of these names: | |
9 | + | |
10 | + -before-generate-app Called before an application is generated | |
11 | + -after-generate-app Called after an application is generated | |
12 | + | |
13 | + -before-generate-controller Called before a controller is generated | |
14 | + -after-generate-controller Called after a controller is generated | |
15 | + | |
16 | + -before-generate-model Called before a model is generated | |
17 | + -after-generate-model Called after a model is generated | |
18 | + | |
19 | + -before-generate-profile Called before a profile is generated | |
20 | + -after-generate-profile Called after a profile is generated | |
21 | + --> | |
22 | + <import file="${workspace.config.dir}/plugin.xml"/> | |
23 | + | |
24 | + <!-- | |
25 | + <target name="-after-generate-model"> | |
26 | + ... use ${args.path}, ${args.name} and ${args.fields} as needed ... | |
27 | + </target> | |
28 | + | |
29 | + Other targets are similar. There are properties prefixed with "args." and the name of | |
30 | + the command line option that hold the parameters for the command. | |
31 | + --> | |
32 | +</project> | |
... | ... |
... | ... | @@ -0,0 +1,29 @@ |
1 | +# ============================================================================= | |
2 | +# This file defines default property values that apply to the "production" build | |
3 | +# environment. | |
4 | +# | |
5 | +# Please use production.properties to customize these properties unless you want | |
6 | +# your customizations to be for all environments. In that case, you can instead | |
7 | +# override these properties in build.properties. | |
8 | +# | |
9 | +# The properties defined in this file take priority over defaults.properties | |
10 | +# but are lower priority than build.properties which in turn is lower priority | |
11 | +# than production.properties. | |
12 | +# | |
13 | +# IMPORTANT - This file should not be modified by an app as it is overwritten | |
14 | +# during each app upgrade. | |
15 | +# ============================================================================= | |
16 | + | |
17 | +build.options.logger=no | |
18 | + | |
19 | +build.options.debug=false | |
20 | + | |
21 | +# enable yui compression | |
22 | +build.compression.yui=1 | |
23 | + | |
24 | +# enable the full class system optimizer | |
25 | +build.optimize=${build.optimize.enable} | |
26 | + | |
27 | +build.enable.embedded.manifest=false | |
28 | + | |
29 | +app.microloader.name=production.js | |
... | ... |
... | ... | @@ -0,0 +1,8 @@ |
1 | +# ============================================================================= | |
2 | +# This file provides an override point for default variables defined in | |
3 | +# production.defaults.properties. These properties are only imported when building | |
4 | +# for the "production" environment. | |
5 | +# | |
6 | +# Properties defined in this file take priority over build.properties but are | |
7 | +# only loaded for "production" builds. | |
8 | +# ============================================================================= | |
... | ... |
... | ... | @@ -0,0 +1,152 @@ |
1 | +<project name="refresh-impl"> | |
2 | + <!-- | |
3 | + This macrodef regenerates the bootstrap.js class system metadata, which includes | |
4 | + relative file paths, class names, alternate class names, and class alias data | |
5 | + --> | |
6 | + <macrodef name="x-run-bootstrap"> | |
7 | + <attribute name="file"/> | |
8 | + <attribute name="basedir"/> | |
9 | + <attribute name="appendMicroloader" default="false"/> | |
10 | + <sequential> | |
11 | + | |
12 | + <local name="tag.filter"/> | |
13 | + <local name="ux.include"/> | |
14 | + <local name="load.script.tpl"/> | |
15 | + | |
16 | + <condition property="tag.filter" value="package-sencha-core,core"> | |
17 | + <x-is-true value="${enable.sencha-core.filter}"/> | |
18 | + </condition> | |
19 | + <property name="tag.filter" value="core"/> | |
20 | + | |
21 | + <if> | |
22 | + <equals arg1="${framework.name}" arg2="ext"/> | |
23 | + <then> | |
24 | + <property name="ux.include"> | |
25 | + include | |
26 | + -namespace=Ext.ux | |
27 | + and | |
28 | + </property> | |
29 | + <property name="load.script.tpl" value="Ext.Loader.loadScript("{0}");"/> | |
30 | + </then> | |
31 | + <else> | |
32 | + <property name="ux.include" value=""/> | |
33 | + <property name="load.script.tpl" value="Ext.Loader.loadScriptFile("{0}", Ext.emptyFn);"/> | |
34 | + </else> | |
35 | + </if> | |
36 | + | |
37 | +<echo file="@{file}"> | |
38 | +/** | |
39 | + * This file is generated by Sencha Cmd and should NOT be edited. It is | |
40 | + * provided to support globbing requires, custom xtypes, and other | |
41 | + * metadata-driven class system features | |
42 | + */ | |
43 | +</echo> | |
44 | + <x-compile refid="${compiler.ref.id}"> | |
45 | + <![CDATA[ | |
46 | + union | |
47 | + -not | |
48 | + -tag=${tag.filter} | |
49 | + and | |
50 | + metadata | |
51 | + +append | |
52 | + -base-path=@{basedir} | |
53 | + +loader-paths | |
54 | + -jsonp=Ext.Loader.addClassPathMappings | |
55 | + -out=@{file} | |
56 | + and | |
57 | + exclude | |
58 | + -tag=${tag.filter} | |
59 | + and | |
60 | + ${ux.include} | |
61 | + metadata | |
62 | + +append | |
63 | + -base-path=@{basedir} | |
64 | + +alternates | |
65 | + -out=@{file} | |
66 | + and | |
67 | + metadata | |
68 | + +append | |
69 | + -base-path=@{basedir} | |
70 | + +alias | |
71 | + -out=@{file} | |
72 | + and | |
73 | + meta | |
74 | + +append | |
75 | + +packages | |
76 | + -out=@{file} | |
77 | + and | |
78 | + union | |
79 | + -tag=overrides | |
80 | + and | |
81 | + metadata | |
82 | + -base-path=@{basedir} | |
83 | + +append | |
84 | + +filenames | |
85 | + -tpl=${load.script.tpl}; | |
86 | + -out=@{file} | |
87 | + ]]> | |
88 | + </x-compile> | |
89 | + </sequential> | |
90 | + </macrodef> | |
91 | + | |
92 | + <!-- | |
93 | + Refreshes the application's bootstrap javascript and microloader manifest | |
94 | + '-detect-app-build-properties' is defined in js-impl.xml | |
95 | + --> | |
96 | + <target name="-refresh-app" depends="-detect-app-build-properties"> | |
97 | + | |
98 | + <!--regenerate class system metadata--> | |
99 | + <x-run-bootstrap file="${app.bootstrap.js}" | |
100 | + basedir="${app.bootstrap.base.path}"/> | |
101 | + | |
102 | + <!--regenerate json manifest bootstrap data--> | |
103 | + <if> | |
104 | + <equals arg1="${app.page.mode}" arg2="xcompile"/> | |
105 | + <then> | |
106 | + <!-- | |
107 | + append the microloader and manifest to the end | |
108 | + of bootstrap.js | |
109 | + --> | |
110 | + <x-compile refid="${compiler.ref.id}"> | |
111 | + <![CDATA[ | |
112 | + microload | |
113 | + -operation=microloader | |
114 | + -microloaderPath=${app.microloader.bootstrap} | |
115 | + -append | |
116 | + -out=${app.bootstrap.js} | |
117 | + ]]> | |
118 | + </x-compile> | |
119 | + </then> | |
120 | + </if> | |
121 | + | |
122 | + <!-- | |
123 | + create / overwrite bootstrap.json, which will be used | |
124 | + by the default development.js microloader | |
125 | + --> | |
126 | + | |
127 | +<echo file="${build.json.bootstrap.path}"> | |
128 | +/** | |
129 | + * This file is generated by Sencha Cmd and should NOT be edited. It is a | |
130 | + * combination of content from app.json, and all required package's package.json | |
131 | + * files. Customizations should be placed in app.json. | |
132 | + */ | |
133 | +</echo> | |
134 | + <x-compile refid="${compiler.ref.id}"> | |
135 | + <![CDATA[ | |
136 | + microload | |
137 | + -operation=json | |
138 | + -bootstrap | |
139 | + -append | |
140 | + -tpl={0} | |
141 | + -out=${build.json.bootstrap.path} | |
142 | + ]]> | |
143 | + </x-compile> | |
144 | + </target> | |
145 | + | |
146 | + <!-- | |
147 | + Refresh app | |
148 | + --> | |
149 | + <target name="-before-refresh"/> | |
150 | + <target name="-refresh" depends="-refresh-app"/> | |
151 | + <target name="-after-refresh"/> | |
152 | +</project> | |
0 | 153 | \ No newline at end of file |
... | ... |
... | ... | @@ -0,0 +1,83 @@ |
1 | +<project name="resolve-impl"> | |
2 | + | |
3 | + <target name="-before-web-start"/> | |
4 | + <target name="-web-start"> | |
5 | + <property name="enable.background.server" value="false"/> | |
6 | + <x-sencha-command> | |
7 | + <![CDATA[ | |
8 | + fs | |
9 | + web | |
10 | + -port=${build.web.port} | |
11 | + -background=${enable.background.server} | |
12 | + start | |
13 | + -map=${build.web.root} | |
14 | + ]]> | |
15 | + </x-sencha-command> | |
16 | + </target> | |
17 | + <target name="-after-web-start"/> | |
18 | + <target name="web-start" | |
19 | + depends="-init,-before-web-start,-web-start,-after-web-start"/> | |
20 | + | |
21 | + <target name="-before-web-stop"/> | |
22 | + <target name="-web-stop"> | |
23 | + <!-- | |
24 | + This needs to be in it's own process due to threading issues when called from a | |
25 | + target. | |
26 | + --> | |
27 | + <x-shell dir="${app.dir}"> | |
28 | + ${cmd.dir}/sencha fs web -port ${build.web.port} stop | |
29 | + </x-shell> | |
30 | + </target> | |
31 | + <target name="-after-web-stop"/> | |
32 | + <target name="web-stop" | |
33 | + depends="-init,-before-web-stop,-web-stop,-after-web-stop"/> | |
34 | + | |
35 | + <target name="-resolve-impl" depends="-refresh"> | |
36 | + <x-ant-call target="web-start" unless="skip.web.start"> | |
37 | + <param name="enable.background.server" value="true"/> | |
38 | + </x-ant-call> | |
39 | + | |
40 | + <local name="app.relative.url"/> | |
41 | + <local name="build.resolve.relative.url"/> | |
42 | + | |
43 | + <!--calculate the relative path from the web root to the index page--> | |
44 | + <x-get-relative-path from="${build.web.root}" | |
45 | + to="${app.page.file}" | |
46 | + property="app.relative.url"/> | |
47 | + | |
48 | + <property name="build.resolve.relative.url" | |
49 | + value="${build.resolve.url}/${app.relative.url}"/> | |
50 | + | |
51 | + <x-sencha-command dir="${app.dir}" inheritall="true"> | |
52 | + <![CDATA[ | |
53 | + app | |
54 | + resolve | |
55 | + -mode=${build.resolve.mode} | |
56 | + -uri=${build.resolve.relative.url} | |
57 | + -tpl=${build.resolve.tpl} | |
58 | + -out=${build.resolve.file} | |
59 | + ]]> | |
60 | + </x-sencha-command> | |
61 | + <x-ant-call target="web-stop" unless="skip.web.start"/> | |
62 | + <x-compile refid="${compiler.ref.id}"> | |
63 | + <![CDATA[ | |
64 | + restore | |
65 | + page | |
66 | + and | |
67 | + load-refs | |
68 | + -file=${build.resolve.file} | |
69 | + -defaultSrcName=@${build.tag.name} | |
70 | + -allowUnmatched=${build.resolve.allow.unmatched} | |
71 | + and | |
72 | + save | |
73 | + page | |
74 | + ]]> | |
75 | + </x-compile> | |
76 | + </target> | |
77 | + | |
78 | + <target name="-before-resolve"/> | |
79 | + <target name="-resolve"> | |
80 | + <x-ant-call target="-resolve-impl"/> | |
81 | + </target> | |
82 | + <target name="-after-resolve"/> | |
83 | + </project> | |
0 | 84 | \ No newline at end of file |
... | ... |
... | ... | @@ -0,0 +1,25 @@ |
1 | +<project name="resources-impl"> | |
2 | + <target name="-before-resources"/> | |
3 | + <target name="-after-resources"/> | |
4 | + | |
5 | + <!--'-init-compiler' defined in init-impl.xml--> | |
6 | + <target name="-resources" depends="-init-compiler"> | |
7 | + <x-compile refid="${compiler.ref.id}"> | |
8 | + <![CDATA[ | |
9 | + resources | |
10 | + -excludes=-all*.css | |
11 | + -out=${build.resources.dir} | |
12 | + and | |
13 | + resources | |
14 | + -model=true | |
15 | + -out=${build.dir} | |
16 | + ]]> | |
17 | + </x-compile> | |
18 | + </target> | |
19 | + | |
20 | + <!-- Legacy targets (implement -before-resources or -after-resources instead): --> | |
21 | + <target name="-after-copy-resources"/> | |
22 | + <target name="-after-inherit-resources"/> | |
23 | + <target name="-before-copy-resources"/> | |
24 | + <target name="-before-inherit-resources"/> | |
25 | +</project> | |
... | ... |
... | ... | @@ -0,0 +1,225 @@ |
1 | +<project name="sass-impl"> | |
2 | + | |
3 | + <!-- | |
4 | + Uses the compiler to generate the top-level scss file for the app | |
5 | + by using the current set of js files to determine the Components | |
6 | + used by the app, then including the corresponding scss files into the | |
7 | + app's style | |
8 | + --> | |
9 | + <target name="-compile-sass" depends="-init-compiler"> | |
10 | + <x-normalize-path | |
11 | + path="${build.dir}/resources" | |
12 | + property="image.search.path"/> | |
13 | + | |
14 | + <x-compile refid="${compiler.ref.id}"> | |
15 | + <![CDATA[ | |
16 | + restore | |
17 | + page | |
18 | + and | |
19 | + #only set variables for used classes eg. $include-class-name | |
20 | + sass | |
21 | + +class-name-vars | |
22 | + -variable=$image-search-path:'${image.search.path}' | |
23 | + -variable=$theme-name: '${app.theme}' !default | |
24 | + -output=${app.out.scss} | |
25 | + and | |
26 | + include | |
27 | + -all | |
28 | + and | |
29 | + # include etc and vars from all classes | |
30 | + sass | |
31 | + +etc | |
32 | + +vars | |
33 | + +append | |
34 | + -output=${app.out.scss} | |
35 | + and | |
36 | + restore | |
37 | + page | |
38 | + and | |
39 | + #only include rules from used classes | |
40 | + sass | |
41 | + +rules | |
42 | + +append | |
43 | + -output=${app.out.scss} | |
44 | + and | |
45 | + sass | |
46 | + +ruby | |
47 | + -output=${app.out.ruby} | |
48 | + ]]> | |
49 | + </x-compile> | |
50 | + <!-- | |
51 | + app.out.css.path is relative to the app output index.html file | |
52 | + --> | |
53 | + <x-get-relative-path | |
54 | + from="${app.dir}" | |
55 | + to="${app.out.css}" | |
56 | + property="app.out.css.path" | |
57 | + /> | |
58 | + | |
59 | +<!--update the application's bootstrap.css file to point to the build output--> | |
60 | +<echo file="${app.bootstrap.css}"> | |
61 | +<![CDATA[ | |
62 | +/* | |
63 | + * This file is generated by Sencha Cmd and should NOT be edited. It redirects | |
64 | + * to the most recently built CSS file for the application to allow index.html | |
65 | + * in the development directory to load properly (i.e., "dev mode"). | |
66 | + */ | |
67 | +@import '${app.out.css.path}'; | |
68 | +]]> | |
69 | +</echo> | |
70 | + </target> | |
71 | + | |
72 | + <!-- | |
73 | + This macrodef is used for post-processing Ext JS 4.2+ style theme css files | |
74 | + and will split based on selector thresholds, as well as run the css preprocessor | |
75 | + and compressor | |
76 | + --> | |
77 | + <macrodef name="x-compress-css-files"> | |
78 | + <attribute name="dir"/> | |
79 | + <attribute name="prefix"/> | |
80 | + <attribute name="outprefix"/> | |
81 | + <attribute name="compress"/> | |
82 | + <attribute name="preprocess"/> | |
83 | + <sequential> | |
84 | + <x-split-css file="@{dir}/@{prefix}.css" | |
85 | + outdir="${build.resources.dir}" | |
86 | + limit="${build.css.selector.limit}"/> | |
87 | + | |
88 | + <for param="cssfile"> | |
89 | + <fileset dir="@{dir}" includes="@{prefix}*.css"/> | |
90 | + <sequential> | |
91 | + <local name="css.output.name"/> | |
92 | + <local name="pattern"/> | |
93 | + <property name="pattern" value="(.*?)(@{prefix})(_\d{1,2})*\.css"/> | |
94 | + <propertyregex property="css.output.name" | |
95 | + input="@{cssfile}" | |
96 | + regexp="${pattern}" | |
97 | + select="\1@{outprefix}\3.css" | |
98 | + override="true"/> | |
99 | + <if> | |
100 | + <equals arg1="@{preprocess}" arg2="true"/> | |
101 | + <then> | |
102 | + <echo>Preprocessing @{cssfile} to ${css.output.name}</echo> | |
103 | + <x-css-preprocess | |
104 | + file="@{cssfile}" | |
105 | + tofile="${css.output.name}" | |
106 | + options="${build.css.preprocessor.opts}"/> | |
107 | + </then> | |
108 | + </if> | |
109 | + <if> | |
110 | + <equals arg1="@{compress}" arg2="true"/> | |
111 | + <then> | |
112 | + <echo>Compressing @{cssfile} to ${css.output.name}</echo> | |
113 | + <x-compress-css srcfile="@{cssfile}" | |
114 | + outfile="${css.output.name}"/> | |
115 | + </then> | |
116 | + </if> | |
117 | + </sequential> | |
118 | + </for> | |
119 | + </sequential> | |
120 | + </macrodef> | |
121 | + | |
122 | + <!-- | |
123 | + This target builds Ext JS 4.2+ style themes, first generating the top-level | |
124 | + scss file, then running compass with the css, sass, and config options set | |
125 | + --> | |
126 | + <target name="-compass-compile-theme-package"> | |
127 | + <x-run-if-true value="${enable.ext42.themes}"> | |
128 | + <x-ant-call target="-compile-sass"/> | |
129 | + | |
130 | + <x-compass-compile | |
131 | + rubyPath="${build.ruby.path}" | |
132 | + dir="${compass.working.dir}" | |
133 | + trace="${compass.compile.trace}" | |
134 | + boring="${compass.compile.boring}" | |
135 | + force="${compass.compile.force}" | |
136 | + sassdir="${compass.sass.dir}" | |
137 | + cssdir="${compass.css.dir}" | |
138 | + config="${compass.config.file}"/> | |
139 | + | |
140 | + <x-compress-css-files dir="${build.dir}/resources" | |
141 | + prefix="${app.out.base.debug}" | |
142 | + outprefix="${app.out.base}" | |
143 | + preprocess="${build.css.preprocess}" | |
144 | + compress="${build.css.compress}"/> | |
145 | + </x-run-if-true> | |
146 | + </target> | |
147 | + | |
148 | + <!-- | |
149 | + This is a legacy macrodef to support building Ext JS 4.1 themes, which have been | |
150 | + deprecated in favor of Ext JS 4.2 theme packages | |
151 | + --> | |
152 | + <macrodef name="x-build-sass"> | |
153 | + <attribute name="theme"/> | |
154 | + <sequential> | |
155 | + <local name="sass.name"/> | |
156 | + <local name="use.shell"/> | |
157 | + | |
158 | + <!-- | |
159 | + convert abspath to just the leaf path name | |
160 | + --> | |
161 | + <basename property="sass.name" file="@{theme}"/> | |
162 | + <local name="sass.base.name"/> | |
163 | + <property name="sass.base.name" value="${sass.name}"/> | |
164 | + | |
165 | + <echo>Compiling sass directory : @{theme}/sass</echo> | |
166 | + <x-compass-compile | |
167 | + rubyPath="${build.ruby.path}" | |
168 | + boring="${compass.compile.boring}" | |
169 | + force="${compass.compile.force}" | |
170 | + trace="${compass.compile.trace}" | |
171 | + dir="@{theme}/sass"/> | |
172 | + | |
173 | + <x-compress-css srcfile="${app.dir}/resources/${sass.base.name}/*.css" | |
174 | + outdir="${app.dir}/resources/${sass.base.name}"/> | |
175 | + </sequential> | |
176 | + </macrodef> | |
177 | + | |
178 | + <!-- | |
179 | + This target builds Ext JS 4.1 style themes, iterating over each directory | |
180 | + under the specified ${app.theme.dir} directory and compiling the sass | |
181 | + located there | |
182 | + --> | |
183 | + <target name="-compass-compile-theme-folders"> | |
184 | + <x-run-if-true value="${enable.ext41.themes}"> | |
185 | + <!-- run sass compilation over the various themes --> | |
186 | + <for param="sass"> | |
187 | + <dirset dir="${app.theme.dir}" includes="*"/> | |
188 | + <sequential> | |
189 | + <x-build-sass theme="@{sass}"/> | |
190 | + </sequential> | |
191 | + </for> | |
192 | + </x-run-if-true> | |
193 | + </target> | |
194 | + | |
195 | + <!-- | |
196 | + This target builds Touch style themes, by running compass | |
197 | + over the directory containing the manually maintined scss files | |
198 | + --> | |
199 | + <target name="-compass-compile-sass-dir"> | |
200 | + <x-run-if-true value="${enable.touch.themes}"> | |
201 | + <x-compass-compile | |
202 | + rubyPath="${build.ruby.path}" | |
203 | + trace="${compass.compile.trace}" | |
204 | + boring="${compass.compile.boring}" | |
205 | + force="${compass.compile.force}" | |
206 | + dir="${compass.sass.dir}"/> | |
207 | + </x-run-if-true> | |
208 | + </target> | |
209 | + | |
210 | + <!-- | |
211 | + This is a summation target triggering the three different supported | |
212 | + sass modes (ext 41, ext 42+, and touch). | |
213 | + --> | |
214 | + <target name="-compass-compile" | |
215 | + depends="-compass-compile-theme-package, | |
216 | + -compass-compile-theme-folders, | |
217 | + -compass-compile-sass-dir"/> | |
218 | + | |
219 | + <!-- | |
220 | + Build SASS | |
221 | + --> | |
222 | + <target name="-before-sass"/> | |
223 | + <target name="-sass" depends="-compass-compile"/> | |
224 | + <target name="-after-sass"/> | |
225 | +</project> | |
0 | 226 | \ No newline at end of file |
... | ... |
... | ... | @@ -0,0 +1,50 @@ |
1 | +# The name of the application | |
2 | +app.name=amdaApp | |
3 | + | |
4 | +# The name of the framework used by the application (ext / touch) | |
5 | +app.framework=ext | |
6 | + | |
7 | +# The path(s) to application javascript sources (comma separated) | |
8 | +app.classpath=${app.dir}/js/app,${app.dir}/js/lib/ux,${app.dir}/js/lib/SAMP,${app.dir}/js/lib/ext-override.js | |
9 | + | |
10 | +# Output location for application build artifacts | |
11 | +app.build.dir=${workspace.build.dir}/${app.name} | |
12 | + | |
13 | +# The root namespace to use when mapping scss resources to js classes | |
14 | +# in the sass/src and sass/var directories | |
15 | +app.sass.namespace=amdaApp | |
16 | + | |
17 | +# Path to sass rule definition files corresponding to JavaScript classes. | |
18 | +app.sass.srcpath=${app.dir}/sass/src | |
19 | + | |
20 | +# Path to sass variable definition files corresponding to JavaScript classes. | |
21 | +app.sass.varpath=${app.dir}/sass/var | |
22 | + | |
23 | +# Path to sass function and mixin files. | |
24 | +app.sass.etcpath=${app.dir}/sass/etc/all.scss | |
25 | + | |
26 | +# Path to extra ruby files to include into the generated sass config.rb, | |
27 | +# <approot>/sass/config.rb will be included automatically if present and does | |
28 | +# not need to be specified. | |
29 | +# app.sass.rubypath= | |
30 | + | |
31 | +# The name of the package containing the theme scss for the app | |
32 | +app.theme=ext-theme-classic | |
33 | + | |
34 | +# This property can be modified to change the input and output page file | |
35 | +# used in the compile command. (eg: index.aspx, index.jsp ... ) | |
36 | +app.page.name=index.html | |
37 | + | |
38 | +# the input page file | |
39 | +app.page.file=${app.dir}/${app.page.name} | |
40 | + | |
41 | +# this property specifies a comma separated list of paths containing | |
42 | +# resources to copy to the build directory | |
43 | +app.resource.paths=${app.dir}/resources | |
44 | + | |
45 | +#============================================================================== | |
46 | +# Custom Properties - Place customizations below this line to avoid merge | |
47 | +# conflicts with newer versions | |
48 | + | |
49 | +app.framework.version=4.2.4.1664 | |
50 | +app.cmd.version=4.0.5.87 | |
... | ... |
... | ... | @@ -0,0 +1,236 @@ |
1 | +<project name="slice-impl"> | |
2 | + <!-- | |
3 | + Uses the compiler to generate a special theme-only scss file containing | |
4 | + rules for all framework / package / app components. This is then used | |
5 | + by the slicer example page to capture theme sprites | |
6 | + --> | |
7 | + <target name="-compile-slicer-sass" depends="-init-compiler"> | |
8 | + <x-normalize-path | |
9 | + path="${build.dir}/resources" | |
10 | + property="image.search.path"/> | |
11 | + | |
12 | + <x-compile refid="${compiler.ref.id}"> | |
13 | + <![CDATA[ | |
14 | + restore | |
15 | + page | |
16 | + and | |
17 | + include | |
18 | + -all | |
19 | + and | |
20 | + sass | |
21 | + +class-name-vars | |
22 | + +etc | |
23 | + +vars | |
24 | + +rules | |
25 | + -variable=$image-search-path:'${image.search.path}' | |
26 | + -variable=$theme-name: '${app.theme}' !default | |
27 | + -output=${app.example.scss} | |
28 | + and | |
29 | + restore | |
30 | + page | |
31 | + and | |
32 | + sass | |
33 | + +ruby | |
34 | + -output=${app.example.out.ruby} | |
35 | + ]]> | |
36 | + </x-compile> | |
37 | + | |
38 | + <x-get-relative-path from="${app.example.dir}" | |
39 | + to="${app.example.css}" | |
40 | + property="app.example.css.path"/> | |
41 | + | |
42 | +<!--update the app's example to point to the build output--> | |
43 | +<echo file="${app.example.css.file}"> | |
44 | +<![CDATA[ | |
45 | +/* | |
46 | + * This file is generated by Sencha Cmd and should NOT be edited. It redirects | |
47 | + * to the most recently built CSS file for the application to allow theme.html | |
48 | + * to load properly for image slicing (required to support non-CSS3 browsers | |
49 | + * such as IE9 and below). | |
50 | + */ | |
51 | +@import '${app.example.css.path}'; | |
52 | +]]> | |
53 | +</echo> | |
54 | + </target> | |
55 | + | |
56 | + <!-- | |
57 | + Compiles the scss file for the theme slicer page | |
58 | + --> | |
59 | + <target name="-compass-compile-slicer-css" depends="-compile-slicer-sass"> | |
60 | + <x-compass-compile | |
61 | + dir="${app.example.build.dir}" | |
62 | + trace="${compass.compile.trace}" | |
63 | + boring="${compass.compile.boring}" | |
64 | + force="${compass.compile.force}" | |
65 | + sassdir="${app.example.build.dir}" | |
66 | + cssdir="${app.example.build.dir}" | |
67 | + config="${app.example.compass.config}"/> | |
68 | + </target> | |
69 | + | |
70 | + <!-- | |
71 | + Generates theme images for Ext JS 4.2+ apps using theme packages | |
72 | + '-detect-app-build-properties' is defined in js-impl.xml | |
73 | + --> | |
74 | + <target name="-slice-app-theme" depends="-detect-app-build-properties"> | |
75 | + <x-ant-call target="-compass-compile-slicer-css"/> | |
76 | + <x-run-bootstrap file="${bootstrap.example.js}" | |
77 | + basedir="${bootstrap.base.path}"/> | |
78 | + | |
79 | + <echo>Capture theme image to ${build.capture.png}</echo> | |
80 | + <x-sencha-command> | |
81 | + <![CDATA[ | |
82 | + theme | |
83 | + capture | |
84 | + -page=${app.example.theme.html} | |
85 | + -image=${build.capture.png} | |
86 | + -manifest=${build.capture.json} | |
87 | + ]]> | |
88 | + </x-sencha-command> | |
89 | + | |
90 | + <echo>Slicing theme images to ${build.resources.dir}</echo> | |
91 | + <x-sencha-command> | |
92 | + <![CDATA[ | |
93 | + fs | |
94 | + slice | |
95 | + ${build.slice.options} | |
96 | + -image=${build.capture.png} | |
97 | + -manifest=${build.capture.json} | |
98 | + -out=${build.resources.dir} | |
99 | + ]]> | |
100 | + </x-sencha-command> | |
101 | + </target> | |
102 | + | |
103 | + <macrodef name="x-build-theme"> | |
104 | + <attribute name="theme" description="the path of the theme folder"/> | |
105 | + <attribute name="buildsass" default="false"/> | |
106 | + <attribute name="basetheme" default="default"/> | |
107 | + <sequential> | |
108 | + <local name="theme.name"/> | |
109 | + | |
110 | + <local name="framework.theme.dir"/> | |
111 | + <local name="tmp.theme.dir"/> | |
112 | + <local name="tmp.img.dir"/> | |
113 | + | |
114 | + <basename property="theme.name" file="@{theme}"/> | |
115 | + <local name="theme.base.name"/> | |
116 | + <property name="theme.base.name" value="${theme.name}"/> | |
117 | + <property name="theme.images.dir" location="@{theme}/images"/> | |
118 | + <property name="theme.page.dir" location="@{theme}/${theme.page.name}"/> | |
119 | + | |
120 | + <property name="tmp.res.dir" value="${app.resources.dir}"/> | |
121 | + <property name="tmp.theme.dir" value="${tmp.res.dir}/${theme.base.name}"/> | |
122 | + <property name="tmp.img.dir" value="${tmp.theme.dir}/images"/> | |
123 | + | |
124 | + <property name="app.res.dir" location="${app.dir}/packages"/> | |
125 | + <property name="app.img.dir" location="${app.res.dir}/images"/> | |
126 | + | |
127 | + <property name="framework.res.dir" location="${framework.dir}/resources"/> | |
128 | + <property name="framework.img.dir" location="${framework.res.dir}/themes/images"/> | |
129 | + <property name="framework.theme.dir" location="${framework.img.dir}/@{basetheme}"/> | |
130 | + | |
131 | + <echo>Copying base framework images from ${framework.theme.dir} to ${tmp.img.dir}</echo> | |
132 | + <copy todir="${tmp.img.dir}"> | |
133 | + <fileset dir="${framework.theme.dir}" includes="**/*"/> | |
134 | + </copy> | |
135 | + | |
136 | + <if> | |
137 | + <equals arg1="@{buildsass}" arg2="true"/> | |
138 | + <then> | |
139 | + <echo>Building sass for theme ${theme.name}</echo> | |
140 | + <!--x-build-sass is defined in sass-impl.xml--> | |
141 | + <x-build-sass theme="@{theme}"/> | |
142 | + </then> | |
143 | + </if> | |
144 | + | |
145 | + <echo>Slicing images for theme ${theme.name} to ${tmp.img.dir}</echo> | |
146 | + <x-sencha-command> | |
147 | + <![CDATA[ | |
148 | + theme | |
149 | + build | |
150 | + -data-file=${build.capture.json} | |
151 | + -image-file=${build.capture.png} | |
152 | + -page=${theme.page.dir} | |
153 | + -out=${tmp.img.dir} | |
154 | + ]]> | |
155 | + </x-sencha-command> | |
156 | + | |
157 | + <if> | |
158 | + <available file="${theme.images.dir}"/> | |
159 | + <then> | |
160 | + <echo>Copying user defined images from @{theme}/images to ${tmp.img.dir}</echo> | |
161 | + <copy todir="${tmp.img.dir}"> | |
162 | + <fileset dir="${theme.images.dir}" includes="**/*"/> | |
163 | + </copy> | |
164 | + </then> | |
165 | + </if> | |
166 | + | |
167 | + </sequential> | |
168 | + </macrodef> | |
169 | + | |
170 | + <!-- | |
171 | + This is a legacy macrodef for copying resources in theme-directory based themes. | |
172 | + It is provided to support building Ext JS 4.1 app themes | |
173 | + --> | |
174 | + <macrodef name="x-copy-resources"> | |
175 | + <sequential> | |
176 | + <copy todir="${build.resources.dir}" includeEmptyDirs="false"> | |
177 | + <fileset dir="${app.resources.dir}" | |
178 | + includes="**/*"/> | |
179 | + </copy> | |
180 | + | |
181 | + <x-get-relative-path from="${app.dir}" | |
182 | + to="${framework.dir}" | |
183 | + property="framework.rel.path"/> | |
184 | + | |
185 | + <copy toDir="${build.dir}/${framework.rel.path}"> | |
186 | + <fileset dir="${framework.dir}" | |
187 | + includes="src/ux/**/css/**/*"/> | |
188 | + </copy> | |
189 | + </sequential> | |
190 | + </macrodef> | |
191 | + | |
192 | + <!-- | |
193 | + Generates theme images for Ext JS 4.1 apps that use directory based | |
194 | + themes. These have been deprecated in favor of ExtJS 4.2 theme packages | |
195 | + --> | |
196 | + <target name="-slice-theme-directories"> | |
197 | + <echo>Processing theme directories from ${app.theme.dir}</echo> | |
198 | + <for param="theme"> | |
199 | + <dirset dir="${app.theme.dir}" includes="*"/> | |
200 | + <sequential> | |
201 | + <x-build-theme theme="@{theme}"/> | |
202 | + </sequential> | |
203 | + </for> | |
204 | + <x-copy-resources/> | |
205 | + </target> | |
206 | + | |
207 | + <target name="-slice-images"> | |
208 | + <x-run-if-true value="${enable.ext42.themes}"> | |
209 | + <x-ant-call target="-slice-app-theme"/> | |
210 | + </x-run-if-true> | |
211 | + <x-run-if-true value="${enable.ext41.themes}"> | |
212 | + <x-ant-call target="-slice-theme-directories"/> | |
213 | + </x-run-if-true> | |
214 | + </target> | |
215 | + | |
216 | + <target name="-before-slice"/> | |
217 | + <target name="-slice" depends="-slice-images"/> | |
218 | + <target name="-after-slice"/> | |
219 | + | |
220 | + <!-- | |
221 | + Refresh Individual Theme | |
222 | + --> | |
223 | + <target name="-before-refresh-theme"/> | |
224 | + <target name="-refresh-theme"> | |
225 | + <if> | |
226 | + <x-is-true value="${enable.ext41.themes}"/> | |
227 | + <then> | |
228 | + <local name="theme.dir"/> | |
229 | + <property name="theme.dir" location="${app.theme.dir}/${args.themeName}"/> | |
230 | + <x-build-theme theme="${theme.dir}" buildsass="true"/> | |
231 | + <x-copy-resources/> | |
232 | + </then> | |
233 | + </if> | |
234 | + </target> | |
235 | + <target name="-after-refresh-theme"/> | |
236 | +</project> | |
0 | 237 | \ No newline at end of file |
... | ... |
... | ... | @@ -0,0 +1,23 @@ |
1 | +# ============================================================================= | |
2 | +# This file defines default property values that apply to the "testing" build | |
3 | +# environment. | |
4 | +# | |
5 | +# Please use testing.properties to customize these properties unless you want | |
6 | +# your customizations to be for all environments. In that case, you can instead | |
7 | +# override these properties in build.properties. | |
8 | +# | |
9 | +# The properties defined in this file take priority over defaults.properties | |
10 | +# but are lower priority than build.properties which in turn is lower priority | |
11 | +# than testing.properties. | |
12 | +# | |
13 | +# IMPORTANT - This file should not be modified by an app as it is overwritten | |
14 | +# during each app upgrade. | |
15 | +# ============================================================================= | |
16 | + | |
17 | +build.options.logger=yes | |
18 | + | |
19 | +build.options.debug=true | |
20 | + | |
21 | +build.css.compress=false | |
22 | + | |
23 | +app.microloader.name=testing.js | |
... | ... |
... | ... | @@ -0,0 +1,8 @@ |
1 | +# ============================================================================= | |
2 | +# This file provides an override point for default variables defined in | |
3 | +# testing.defaults.properties. These properties are only imported when building | |
4 | +# for the "testing" environment. | |
5 | +# | |
6 | +# Properties defined in this file take priority over build.properties but are | |
7 | +# only loaded for "testing" builds. | |
8 | +# ============================================================================= | |
... | ... |
... | ... | @@ -0,0 +1,53 @@ |
1 | +<project name="watch-impl"> | |
2 | + | |
3 | + <target name="-watch-impl"> | |
4 | + <x-ant-call target="${build.trigger.targets}"/> | |
5 | + </target> | |
6 | + | |
7 | + <target name="-watch-compiler"> | |
8 | + <x-watch compilerRef="${compiler.ref.id}" targets="-watch-impl"/> | |
9 | + </target> | |
10 | + | |
11 | + <target name="-watch-theme-package-css"> | |
12 | + <x-compass-watch | |
13 | + rubyPath="${build.ruby.path}" | |
14 | + dir="${compass.working.dir}" | |
15 | + trace="${compass.compile.trace}" | |
16 | + boring="${compass.compile.boring}" | |
17 | + force="${compass.compile.force}" | |
18 | + sassdir="${compass.sass.dir}" | |
19 | + cssdir="${compass.css.dir}" | |
20 | + config="${compass.config.file}" | |
21 | + fork="true"/> | |
22 | + </target> | |
23 | + | |
24 | + <macrodef name="x-run-compass-watch"> | |
25 | + <attribute name="directory"/> | |
26 | + <sequential> | |
27 | + <x-compass-watch | |
28 | + rubyPath="${build.ruby.path}" | |
29 | + dir="@{directory}" | |
30 | + trace="${compass.compile.trace}" | |
31 | + boring="${compass.compile.boring}" | |
32 | + force="${compass.compile.force}" | |
33 | + fork="true"/> | |
34 | + </sequential> | |
35 | + </macrodef> | |
36 | + | |
37 | + <target name="-watch-sass-dir"> | |
38 | + <x-run-compass-watch directory="${app.sass.dir}"/> | |
39 | + </target> | |
40 | + | |
41 | + <target name="-watch-theme-dir"> | |
42 | + <local name="watch.sass.dir"/> | |
43 | + <property name="watch.sass.dir" | |
44 | + value="${app.theme.dir}/${watch.theme.name}/sass"/> | |
45 | + <x-run-compass-watch directory="${watch.sass.dir}"/> | |
46 | + </target> | |
47 | + | |
48 | + <target name="-before-watch" depends="init"/> | |
49 | + <target name="-watch" depends="app-build-impl.build"> | |
50 | + <x-ant-call target="${build.watcher.targets}"/> | |
51 | + </target> | |
52 | + <target name="-after-watch" depends="init"/> | |
53 | +</project> | |
0 | 54 | \ No newline at end of file |
... | ... |
... | ... | @@ -0,0 +1,11 @@ |
1 | +<project basedir="."> | |
2 | + <!-- | |
3 | + If framework.config.dir is already set, this next task will do nothing and | |
4 | + the original value will remain... but if framework.config.dir is not yet | |
5 | + defined, we are running in a workspace sans framework and so we need to go | |
6 | + directly to the plugin base from cmd.config.dir instead. | |
7 | + --> | |
8 | + <property name="framework.config.dir" value="${cmd.config.dir}"/> | |
9 | + | |
10 | + <import file="${framework.config.dir}/plugin.xml"/> | |
11 | +</project> | |
... | ... |
... | ... | @@ -0,0 +1,35 @@ |
1 | +#Wed, 29 May 2019 09:59:25 +0200 | |
2 | +# ----------------------------------------------------------------------------- | |
3 | +# This file contains configuration options that apply to all applications in | |
4 | +# the workspace. By convention, these options start with "workspace." but any | |
5 | +# option can be set here. Options specified in an application's sencha.cfg will | |
6 | +# take priority over those values contained in this file. These options will | |
7 | +# take priority over configuration values in Sencha Cmd or a framework plugin. | |
8 | + | |
9 | +# ----------------------------------------------------------------------------- | |
10 | +# This configuration property (if set) is included by default in all compile | |
11 | +# commands executed according to this formulation: | |
12 | +# | |
13 | +# sencha compile -classpath=...,${framework.classpath},${workspace.classpath},${app.classpath} | |
14 | + | |
15 | +#workspace.classpath= | |
16 | + | |
17 | +#------------------------------------------------------------------------------ | |
18 | +# This is the folder for build outputs in the workspace | |
19 | + | |
20 | +workspace.build.dir=${workspace.dir}/build | |
21 | + | |
22 | +#------------------------------------------------------------------------------ | |
23 | +# This folder contains all generated and extracted packages. | |
24 | + | |
25 | +workspace.packages.dir=${workspace.dir}/packages | |
26 | + | |
27 | +workspace.theme.dir=${workspace.packages.dir}/${args.themeName} | |
28 | + | |
29 | +# ============================================================================= | |
30 | +# Customizations go below this divider to avoid merge conflicts on upgrade | |
31 | +# ============================================================================= | |
32 | + | |
33 | +workspace.cmd.version=4.0.5.87 | |
34 | + | |
35 | +ext.dir=/opt/tools/extjs | |
... | ... |
... | ... | @@ -0,0 +1,42 @@ |
1 | +<?xml version="1.0" encoding="utf-8"?> | |
2 | +<project name="amdaApp" default=".help"> | |
3 | + <!-- | |
4 | + The build-impl.xml file imported here contains the guts of the build process. It is | |
5 | + a great idea to read that file to understand how the process works, but it is best to | |
6 | + limit your changes to this file. | |
7 | + --> | |
8 | + <import file="${basedir}/.sencha/app/build-impl.xml"/> | |
9 | + | |
10 | + <!-- | |
11 | + The following targets can be provided to inject logic before and/or after key steps | |
12 | + of the build process: | |
13 | + | |
14 | + The "init-local" target is used to initialize properties that may be personalized | |
15 | + for the local machine. | |
16 | + | |
17 | + <target name="-before-init-local"/> | |
18 | + <target name="-after-init-local"/> | |
19 | + | |
20 | + The "clean" target is used to clean build output from the build.dir. | |
21 | + | |
22 | + <target name="-before-clean"/> | |
23 | + <target name="-after-clean"/> | |
24 | + | |
25 | + The general "init" target is used to initialize all other properties, including | |
26 | + those provided by Sencha Cmd. | |
27 | + | |
28 | + <target name="-before-init"/> | |
29 | + <target name="-after-init"/> | |
30 | + | |
31 | + The "page" target performs the call to Sencha Cmd to build the 'all-classes.js' file. | |
32 | + | |
33 | + <target name="-before-page"/> | |
34 | + <target name="-after-page"/> | |
35 | + | |
36 | + The "build" target performs the call to Sencha Cmd to build the application. | |
37 | + | |
38 | + <target name="-before-build"/> | |
39 | + <target name="-after-build"/> | |
40 | + --> | |
41 | + | |
42 | +</project> | |
... | ... |