Skip to content

Commit

Permalink
Fix line endings when building on Windows
Browse files Browse the repository at this point in the history
Move the preflight task to the now generic copy-js task
  • Loading branch information
nschonni committed Nov 27, 2012
1 parent 6ccb0e1 commit 45a6646
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 37 deletions.
4 changes: 0 additions & 4 deletions build.xml
Expand Up @@ -24,8 +24,4 @@
<fileset dir="${src.dir}" includes="**/**/build.xml"/>
</subant>
</target>

<target name="preflight" description="Sets tabbing and encoding as indicated by the contributor guidelines">
<fixcrlf srcdir="${src.dir}" includes="**/*.js" encoding="UTF-8" outputencoding="UTF-8" tab="add" tablength="4" fixlast="yes" />
</target>
</project>
27 changes: 20 additions & 7 deletions build/build-tasks.xml
Expand Up @@ -240,6 +240,10 @@
<exclude name="**/*.min.js" />
</fileset>
</delete>
<fixcrlf srcdir="${build.dir}" fixlast="false" encoding="UTF-8" outputencoding="UTF-8">
<include name="**/*-min.css" />
<include name="**/*-min.js" />
</fixcrlf>
</target>

<target name="-copy-css" depends="compile.sass">
Expand All @@ -264,16 +268,25 @@
</concat>
</target>

<target name="-copy-js">
<copy todir="${build.dir}/js">
<fileset dir="${src.dir}/js"/>
<target name="-copy-js" depends="">
<fixcrlf srcdir="${src.dir}" includes="**/*.js" encoding="UTF-8" outputencoding="UTF-8" tab="add" tablength="4" fixlast="false"/>
<copy todir="${build.dir}" encoding="UTF-8">
<fileset dir="${src.dir}">
<include name="**/*.js"/>
<exclude name="workers/**"/>
<exclude name="pe-ap.js"/>
<exclude name="jquerymobile/jquery.mobile.js"/>
</fileset>
<filterchain>
<replacetokens>
<token key="wet-boew-build.version" value="${wet-boew-build.version}"/>
<token key="wet-boew-build.starttime" value="${wet-boew-build.starttime}"/>
</replacetokens>
<replaceregex byline="false" pattern="^\/(\*)+[^!]" replace="\/\*!" flags="s"/>
</filterchain>
</copy>
<replace dir="${build.dir}">
<include name="**/*.js"/>
<exclude name="**/*-min.js"/>
<exclude name="**/*.min.js"/>
<replacefilter token="@wet-boew-build.version@" value="${wet-boew-build.version}"/>
</replace>
</target>

<target name="-copy-images">
Expand Down
2 changes: 1 addition & 1 deletion build/js/jquery.min.js

Large diffs are not rendered by default.

25 changes: 2 additions & 23 deletions src/js/build.xml
Expand Up @@ -5,30 +5,10 @@
<property file="build.properties"/>
<import file="${build.dir}/../build-tasks.xml"/>

<target name="default" depends="clean,build" description="Performs a clean and build when calling ant without any target"></target>
<target name="default" depends="clean,build" description="Performs a clean and build when calling ant without any target"/>

<target name="copy-all" extensionOf="prepare-files" depends="-copy-css,-copy-images,-copy-js,-copy-binaries"/>
<target name="copy-all" extensionOf="prepare-files" depends="-copy-css,-copy-images,-copy-js,-build-pe,-copy-binaries"/>

<target name="-copy-js" depends="-build-pe">
<copy todir="${build.dir}" encoding="UTF-8">
<fileset dir="${src.dir}">
<include name="**/*.js"/>
<exclude name="workers/**"/>
<exclude name="pe-ap.js"/>
<exclude name="jquerymobile/jquery.mobile.js"/>
</fileset>
<filterchain>
<replaceregex byline="false" pattern="^\/(\*)+[^!]" replace="\/\*!" flags="s"/>
</filterchain>
</copy>
<replace dir="${build.dir}">
<include name="**/*.js"/>
<exclude name="**/*-min.js"/>
<exclude name="**/*.min.js"/>
<replacefilter token="@wet-boew-build.version@" value="${wet-boew-build.version}"/>
</replace>
</target>

<target name="-copy-binaries">
<copy todir="${build.dir}">
<fileset dir="${src.dir}">
Expand All @@ -45,7 +25,6 @@
<filterchain>
<replacetokens>
<token key="wet-boew-build.version" value="${wet-boew-build.version}"/>
<token key="wet-boew-build.starttime" value="${wet-boew-build.starttime}"/>
<token key="wet-boew-build.languagelist" value="${languagelist}"/>
<token key="wet-boew-build.validlanguagelist" value="${validlanguagelist}"/>
<token key="wet-boew-build.validlanguagemethod" value="${validlanguagemethod}"/>
Expand Down
2 changes: 1 addition & 1 deletion src/js/jquery.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/js/workers/zebra.js
Expand Up @@ -290,7 +290,7 @@
// isSimpleTable = false;
// }
// console.log('2 Zebra, isSimpleTable:' + isSimpleTable);
// console.log($('th[rowspan]', elem).length + ' ' + $('th[colspan]', elem).length + ' ' + $('td[rowspan]', elem).length + ' ' + $('td[colspan]', elem).length + ' ' + $('colgroup[span]', elem).length);
// console.log($('th[rowspan]', elem).length + ' ' + $('th[colspan]', elem).length + ' ' + $('td[rowspan]', elem).length + ' ' + $('td[colspan]', elem).length + ' ' + $('colgroup[span]', elem).length);

if (isSimpleTable && (elem.children('tbody').length > 1 || elem.children('thead').children('tr').length > 1 || elem.children('colgroup').length > 2)) {
isSimpleTable = false;
Expand Down

0 comments on commit 45a6646

Please sign in to comment.