Skip to content
Browse files

add file.root.page property to determines script concatenation order

  • Loading branch information...
1 parent 6a572dc commit 0c1d15223a9f90b8645ba600b4f85a5122492c8c @dholth dholth committed Apr 10, 2012
Showing with 17 additions and 4 deletions.
  1. +8 −4 build.xml
  2. +9 −0 config/default.properties
View
12 build.xml
@@ -486,14 +486,18 @@
<!-- JAVASCRIPT -->
<target name="-js.main.concat" depends="-js.all.minify" description="(PRIVATE) Concatenates the JS files in dir.js">
- <echo message="Concatenating Main JS scripts..."/>
+ <filelist id="file.root" dir="${basedir}" files="${file.root.page}"/>
+ <echo message="Concatenating Main JS scripts based on ${file.root.page}..."/>
- <exec executable="java" outputproperty="scripts.ordered">
+ <apply executable="java" parallel="false"
+ outputproperty="scripts.ordered">
<arg value="-cp"/>
<arg value="./${dir.build.tools}"/>
<arg value="ScriptsToConcat"/>
- <arg value="${basedir}/index.html"/>
- </exec>
+ <first>
+ <filelist refid="file.root"/>
+ </first>
+ </apply>
<filelist id="scripts.toconcat" dir="./${dir.intermediate}/" files="${scripts.ordered}">
<file name="${dir.js}/plugins.js"/>
View
9 config/default.properties
@@ -58,6 +58,15 @@ file.default.exclude = .gitignore, .project, .settings, README.markdown,
# Note: you cannot declare an empty file.default.bypass property
#
+# Root page file
+# The <script> tags between the magic comments in this page
+# <!-- scripts concatenated and minified via build script -->
+# <!-- end scripts -->
+# determine the ordered list of scripts to be concatenated, minified,
+# and swapped with file.root.script in all the pages.
+file.root.page = index.html
+
+#
# Root Script file
# this is the file that will be swapped for the concatenated and minified javascript.
#

0 comments on commit 0c1d152

Please sign in to comment.
Something went wrong with that request. Please try again.