Skip to content
This repository was archived by the owner on Nov 23, 2018. It is now read-only.

Commit 07ae7cc

Browse files
committed
Merge pull request #146 from kdimatteo/master
LESS CSS Error Trapping, Upgrade LESS-rhino to 1.3.3 closes #140
2 parents f53a306 + 60dcd5e commit 07ae7cc

File tree

3 files changed

+1186
-325
lines changed

3 files changed

+1186
-325
lines changed

build.xml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -893,6 +893,15 @@
893893
<then>
894894
<echo message="Processing LESS CSS..."/>
895895
<lessjs input="${dir.intermediate}/${dir.css}/style-concat.css" output="${dir.intermediate}/${dir.css}/style-concat.css" />
896+
<!-- load the generated LESS file and check if it contains errors -->
897+
<loadfile property="generatedLESS" srcfile="${dir.intermediate}/${dir.css}/style-concat.css" />
898+
<propertyregex property="errorLESS" input="${generatedLESS}" regexp="Error :" select="\1" casesensitive="true" />
899+
<if>
900+
<equals arg1="${errorLESS}" arg2="\1" />
901+
<then>
902+
<fail message="LESS Compilation Error: ${generatedLESS}" />
903+
</then>
904+
</if>
896905
</then>
897906
<else>
898907
<echo message="NOT Processing LESS CSS"/>

config/default.properties

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,8 +154,8 @@ tool.rhino = rhino.jar
154154
tool.jslint = fulljslint.js
155155
tool.jshint = fulljshint.js
156156
tool.csslint = csslint-rhino.js
157-
tool.lesscss = less-rhino-1.3.0.js
158-
tool.jsdoc3 = jsdoc.js
157+
tool.lesscss = less-rhino-1.3.3.js
158+
tool.jsdoc3 = jsdoc.js
159159
tool.optipng = optipng-0.7.4-win32/optipng.exe
160160
tool.advpng = advancecomp-1.15/advpng.exe
161161
# Default Lint Utils Options

0 commit comments

Comments
 (0)