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 -tpl=${build.microloader.json.tpl.embedded}
59 -out=${build.microloader.path}
60 -resourcePath=${build.out.base.path}
61 -basePath=${metadata.base.path}
65 -operation=microloader
66 -microloaderPath=${app.microloader.path}
67 -bootPath=${build.boot.file}
68 -tpl=${build.microloader.code.tpl}
69 -out=${build.microloader.path}
74 <x-compile refid=
"${compiler.ref.id}">
79 -tpl=${build.microloader.json.tpl.standalone}
80 -out=${build.out.json.path}
81 -resourcePath=${build.out.base.path}
82 -basePath=${metadata.base.path}
86 -tpl=${build.microloader.json.tpl.external}
87 -out=${build.microloader.path}
88 -resourcePath=${build.out.base.path}
89 -basePath=${metadata.base.path}
91 # generate microloader file
94 -operation=microloader
95 -microloaderPath=${app.microloader.path}
96 -bootPath=${build.boot.file}
97 -tpl=${build.microloader.code.tpl}
98 -out=${build.microloader.path}
104 <x-build-microload-markup/>
107 <target name=
"-build-output-microload-page">
109 <x-is-true value=
"${build.enable.embedded.manifest}"/>
111 <x-compile refid=
"${compiler.ref.id}">
113 # generate microloader file
115 -operation=microloader
116 -microloaderPath=${app.microloader.path}
117 -tpl=${build.microloader.code.tpl}
118 -out=${build.microloader.path}
124 -tpl=${build.microloader.json.tpl.embedded}
125 -out=${build.microloader.path}
130 <x-compile refid=
"${compiler.ref.id}">
135 -tpl=${build.microloader.json.tpl.standalone}
136 -out=${build.out.json.path}
138 # generate microloader file
140 -operation=microloader
141 -microloaderPath=${app.microloader.path}
142 -tpl=${build.microloader.code.tpl}
143 -out=${build.microloader.path}
148 -tpl=${build.microloader.json.tpl.external}
149 -out=${build.microloader.path}
154 <x-build-microload-markup/>
157 <!-- generates a separate json manifest for use with native packager -->
158 <target name=
"-build-standalone-json-manifest">
159 <x-run-if-true value=
"${enable.standalone.manifest}">
160 <x-compile refid=
"${compiler.ref.id}">
165 -tpl=${build.microloader.json.tpl.standalone}
166 -out=${build.out.json.path}
172 <target name=
"-build-output-markup-page">
173 <condition property=
"internal.app.css.rel" value=
"${app.out.css.rel}">
174 <x-is-true value=
"${enable.ext42.themes}"/>
176 <property name=
"internal.app.css.rel" value=
""/>
179 <isset property=
"framework.isV5"/>
181 <x-compile refid=
"${compiler.ref.id}">
184 -out=${build.out.page.path}
185 -basePath=${build.out.metadata.dir}
186 -resourcePath=${build.out.base.path}
188 # generate microloader file
192 -tpl=${build.microloader.json.tpl.embedded}
193 -out=${build.microloader.path}
194 -resourcePath=${build.out.base.path}
195 -basePath=${build.out.metadata.dir}
198 <x-compress-js srcFile=
"${build.microloader.path}" outFile=
"${build.microloader.path}"/>
199 <concat destfile=
"${build.out.js.path}.tmp">
200 <fileset file=
"${build.microloader.path}"/>
201 <fileset file=
"${build.out.js.path}"/>
203 <delete file=
"${build.microloader.path}"/>
204 <delete file=
"${build.out.js.path}"/>
205 <move file=
"${build.out.js.path}.tmp" tofile=
"${build.out.js.path}"/>
208 <x-compile refid=
"${compiler.ref.id}">
211 -out=${build.out.page.path}
212 -resourcePath=${build.out.base.path}
213 -basePath=${build.out.metadata.dir}
220 <!-- '-detect-app-build-properties' is defined in js-impl.xml -->
221 <target name=
"-build-output-page"
222 depends=
"-detect-app-build-properties,-build-standalone-json-manifest">
224 <x-is-true value=
"${build.output.markuponly}"/>
226 <x-ant-call target=
"-build-output-markup-page"/>
230 <x-is-true value=
"${build.enable.appmanifest}"/>
232 <x-ant-call target=
"-build-output-manifest-page"/>
235 <x-ant-call target=
"-build-output-microload-page"/>
242 <target name=
"-copy-app-resources" depends=
"-init-compiler">
243 <x-compile refid=
"${compiler.ref.id}">
246 -compress=${enable.resource.compression}
247 -out=${build.out.base.path}
252 <target name=
"-generate-deltas" depends=
"-init-compiler">
253 <x-run-if-true value=
"${app.output.deltas.enable}">
256 <x-is-true value=
"${enable.deltas}"/>
257 <x-is-false value=
"${build.output.markuponly}"/>
260 <x-compile refid=
"${compiler.ref.id}">
263 -archivePath=${build.out.archive.path}
264 -deltaPath=${build.out.delta.path}
265 -resourcePath=${build.out.base.path}
273 <target name=
"-generate-cache-manifest" depends=
"-init-compiler">
274 <x-run-if-true value=
"${app.output.cache.enable}">
277 <x-is-true value=
"${enable.cache.manifest}"/>
278 <x-is-false value=
"${build.output.markuponly}"/>
281 <x-compile refid=
"${compiler.ref.id}">
284 -cacheManifestPath=${build.manifest.path}
287 <replace file=
"${build.out.page.path}"
288 token=
"<html manifest="""
289 value=
"<html manifest="${build.manifest.name}""/>
293 <!--remove manifest placeholder if present-->
294 <replace file=
"${build.out.page.path}"
295 token=
"<html manifest="""
299 <target name=
"-before-page"/>
301 depends=
"-copy-app-resources,
304 -generate-cache-manifest"/>
305 <target name=
"-after-page"/>