1 <project name=
"x-page-impl.xml">
3 <macrodef name=
"x-build-microload-markup">
5 <x-sencha-command dir=
"${app.dir}" inheritall=
"true">
9 ${build.embedded.microloader.compressor}
10 -from=${build.microloader.path}
11 -to=${build.microloader.path}
15 <x-is-true value=
"${build.enable.embedded.microloader}"/>
17 <x-run-if-true value=
"${app.output.page.enable}">
18 <x-compile refid=
"${compiler.ref.id}">
21 -contentFile=${build.microloader.path}
22 -tpl=${build.embedded.microloader.tpl}
23 -out=${build.out.page.path}
26 <!--once the generated microloader file is embedded, delete it-->
27 <delete file=
"${build.microloader.path}"/>
31 <x-run-if-true value=
"${app.output.page.enable}">
32 <x-compile refid=
"${compiler.ref.id}">
35 -markup=${build.external.microloader.markup}
36 -out=${build.out.page.path}
45 <target name=
"-build-output-manifest-page">
46 <local name=
"metadata.base.path"/>
47 <property name=
"metadata.base.path" value=
"${build.out.metadata.dir}"/>
48 <x-run-if-true value=
"${app.output.manifest.enable}">
50 <x-is-true value=
"${build.enable.embedded.manifest}"/>
52 <x-compile refid=
"${compiler.ref.id}">
54 # generate microloader file
58 -fashion=${use.fashion}
59 -tpl=${build.microloader.json.tpl.embedded}
60 -out=${build.microloader.path}
61 -resourcePath=${build.out.base.path}
62 -basePath=${metadata.base.path}
66 -operation=microloader
67 -microloaderPath=${app.microloader.path}
68 -bootPath=${build.boot.file}
69 -tpl=${build.microloader.code.tpl}
70 -out=${build.microloader.path}
75 <x-compile refid=
"${compiler.ref.id}">
80 -fashion=${use.fashion}
81 -tpl=${build.microloader.json.tpl.standalone}
82 -out=${build.out.json.path}
83 -resourcePath=${build.out.base.path}
84 -basePath=${metadata.base.path}
88 -fashion=${use.fashion}
89 -tpl=${build.microloader.json.tpl.external}
90 -out=${build.microloader.path}
91 -resourcePath=${build.out.base.path}
92 -basePath=${metadata.base.path}
94 # generate microloader file
97 -operation=microloader
98 -microloaderPath=${app.microloader.path}
99 -bootPath=${build.boot.file}
100 -tpl=${build.microloader.code.tpl}
101 -out=${build.microloader.path}
107 <x-build-microload-markup/>
110 <target name=
"-build-output-microload-page">
112 <x-is-true value=
"${build.enable.embedded.manifest}"/>
114 <x-compile refid=
"${compiler.ref.id}">
116 # generate microloader file
118 -operation=microloader
119 -microloaderPath=${app.microloader.path}
120 -tpl=${build.microloader.code.tpl}
121 -out=${build.microloader.path}
127 -tpl=${build.microloader.json.tpl.embedded}
128 -out=${build.microloader.path}
133 <x-compile refid=
"${compiler.ref.id}">
138 -tpl=${build.microloader.json.tpl.standalone}
139 -out=${build.out.json.path}
141 # generate microloader file
143 -operation=microloader
144 -microloaderPath=${app.microloader.path}
145 -tpl=${build.microloader.code.tpl}
146 -out=${build.microloader.path}
151 -tpl=${build.microloader.json.tpl.external}
152 -out=${build.microloader.path}
157 <x-build-microload-markup/>
160 <!-- generates a separate json manifest for use with native packager -->
161 <target name=
"-build-standalone-json-manifest">
162 <x-run-if-true value=
"${enable.standalone.manifest}">
163 <x-compile refid=
"${compiler.ref.id}">
168 -tpl=${build.microloader.json.tpl.standalone}
169 -out=${build.out.json.path}
175 <target name=
"-build-output-markup-page">
176 <condition property=
"internal.app.css.rel" value=
"${app.out.css.rel}">
177 <x-is-true value=
"${enable.ext42.themes}"/>
179 <property name=
"internal.app.css.rel" value=
""/>
182 <isset property=
"framework.isV5"/>
184 <x-compile refid=
"${compiler.ref.id}">
187 -out=${build.out.page.path}
188 -basePath=${build.out.metadata.dir}
189 -resourcePath=${build.out.base.path}
191 # generate microloader file
195 -fashion=${use.fashion}
196 -tpl=${build.microloader.json.tpl.embedded}
197 -out=${build.microloader.path}
198 -resourcePath=${build.out.base.path}
199 -basePath=${build.out.metadata.dir}
202 <x-compress-js srcFile=
"${build.microloader.path}" outFile=
"${build.microloader.path}"/>
203 <concat destfile=
"${build.out.js.path}.tmp">
204 <fileset file=
"${build.microloader.path}"/>
205 <fileset file=
"${build.out.js.path}"/>
207 <delete file=
"${build.microloader.path}"/>
208 <delete file=
"${build.out.js.path}"/>
209 <move file=
"${build.out.js.path}.tmp" tofile=
"${build.out.js.path}"/>
212 <x-compile refid=
"${compiler.ref.id}">
215 -out=${build.out.page.path}
216 -resourcePath=${build.out.base.path}
217 -basePath=${build.out.metadata.dir}
224 <!-- '-detect-app-build-properties' is defined in js-impl.xml -->
225 <target name=
"-build-output-page"
226 depends=
"-detect-app-build-properties,-build-standalone-json-manifest">
228 <x-is-true value=
"${build.output.markuponly}"/>
230 <x-ant-call target=
"-build-output-markup-page"/>
234 <x-is-true value=
"${build.enable.appmanifest}"/>
236 <x-ant-call target=
"-build-output-manifest-page"/>
239 <x-ant-call target=
"-build-output-microload-page"/>
246 <target name=
"-copy-app-resources" depends=
"-init-compiler">
247 <x-compile refid=
"${compiler.ref.id}">
250 -compress=${enable.resource.compression}
251 -out=${build.out.base.path}
256 <target name=
"-apply-version-stamps" depends=
"-init-compiler">
257 <x-run-if-true value=
"${app.cache.enable}">
258 <x-compile refid=
"${compiler.ref.id}">
261 -resourcePath=${build.out.base.path}
267 <target name=
"-generate-deltas" depends=
"-apply-version-stamps">
270 <x-is-false value=
"${skip.deltas}"/>
271 <x-is-false value=
"${build.output.markuponly}"/>
274 <x-compile refid=
"${compiler.ref.id}">
277 -archivePath=${build.out.archive.path}
278 -deltaPath=${build.out.deltas.path}
279 -resourcePath=${build.out.base.path}
286 <target name=
"-generate-cache-manifest" depends=
"-init-compiler">
289 <x-is-false value=
"${skip.appCache}"/>
290 <x-is-false value=
"${build.output.markuponly}"/>
293 <x-compile refid=
"${compiler.ref.id}">
296 -cacheManifestPath=${build.manifest.path}
299 <replace file=
"${build.out.page.path}"
300 token=
"<html manifest="""
301 value=
"<html manifest="${build.out.appCache.name}""/>
304 <!--remove manifest placeholder if present-->
305 <replace file=
"${build.out.page.path}"
306 token=
"<html manifest="""
310 <target name=
"-before-page"/>
312 depends=
"-copy-app-resources,
315 -generate-cache-manifest"/>
316 <target name=
"-after-page"/>