Skip to content
This repository has been archived by the owner on Jan 10, 2020. It is now read-only.

Commit

Permalink
Give options for folks without cURL installed.
Browse files Browse the repository at this point in the history
  • Loading branch information
reid committed Oct 20, 2010
1 parent 43ed82a commit 4ae244c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
8 changes: 3 additions & 5 deletions componentbuild/shared/macrolib.xml
Expand Up @@ -72,10 +72,7 @@
<if>
<or>
<istrue value="${yuicompressor.online}"/>
<and>
<available file="curl" filepath="${env.PATH}"/>
<http url="${yuicompressor.url}" errorsBeginAt="500"/>
</and>
<http url="${yuicompressor.url}" errorsBeginAt="500"/>
</or>
<then>
<property name="yuicompressor.online" value="true"/>
Expand All @@ -87,6 +84,7 @@
<sequential>
<property name="yuicompressor.output" value="@{dest}"/>
<property name="yuicompressor.file" value="@{src}"/>
<echo>If this web request fails, try building again with -Dyuicompressor.online=false or install the cURL executable into your PATH.</echo>
<exec executable="curl" input="@{src}" outputproperty="yuicompressor.result" failonerror="true">
<arg value="--silent"/>
<arg line="--data-urlencode "/>
Expand Down Expand Up @@ -141,7 +139,7 @@
<attribute name="args" />
<attribute name="type" default="js"/> <!-- not used by this task branch -->
<sequential>
<echo level="info">Running yuicompressor on @{src}</echo>
<echo level="info">Running yuicompressor on @{src} with @{args}</echo>
<java jar="${yuicompressor.jar}" fork="true" failonerror="true">
<arg line="@{args} -o" />
<arg file="@{dest}" />
Expand Down
1 change: 1 addition & 0 deletions componentbuild/shared/properties.xml
Expand Up @@ -35,6 +35,7 @@
<property name="yuicompressor.css.charset" value="utf-8" />

<property name="yuicompressor.js.args" value="--disable-optimizations --preserve-semi --line-break 6000" />
<property name="yuicompressor.css.args" value="--line-break 6000" />
<property name="yuicompressor.port" value="8091"/>

<!-- Enable/Disable YUI Compressor verbosity. NOTE: Checked in build files should not disable this flag -->
Expand Down

0 comments on commit 4ae244c

Please sign in to comment.