Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Customize YUIBuilder to integrate mustache
<loadfile property="component.mustache.partial" srcFile="${basedir}/mustache/partial.mu">
<filterchain>
<!-- delete blank lines, line breakers, tab character and multiple white spaces -->
<striplinebreaks/>
<tokenfilter>
<replaceregex pattern="\t" replace="" flags="gi"/>
<replaceregex pattern=" +" replace="" flags="gi"/>
<ignoreblank/>
</tokenfilter>
</filterchain>
</loadfile>
<copy file="${builddir}/files/moduletemplate.txt" tofile="@{file}" overwrite="true">
<filterset>
<filter token="CODE" value="${@{module}-@{file}-code}" />
<filter token="YUIVAR" value="${yui.variable}" />
<filter token="MODULE" value="@{module}" />
<filter token="DETAILS" value="${@{module}-details}" />
<filter token="VERSION" value="${component.version}" />
<filter token="MUSTACHE_TEMPLATE" value="${component.mustache.template}" />
</filterset>
</copy>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment