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

Commit

Permalink
Cleanup. Normalized target names [ corebuild -> buildcore ]. Deleted …
Browse files Browse the repository at this point in the history
…deprecated/wip macrolib tasks. Verified they are not currently being extended/used in yui2/src, yui3/src
  • Loading branch information
sdesai committed Feb 25, 2009
1 parent 8c18960 commit b2ae49b
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 140 deletions.
10 changes: 5 additions & 5 deletions componentbuild/2.x/module.xml
Expand Up @@ -4,11 +4,11 @@

<import file="${builddir}/shared/targets.xml" description="Targets common to Rollup/Module" />

<target name="build" depends="corebuild, skinsbuild" />
<target name="skinsbuild" depends="-skinsbuild" />
<target name="build" depends="buildcore, buildskins" />
<target name="buildskins" depends="-buildskins" />

<!-- CORE -->
<target name="corebuild" depends="debugbuild, -createcore, -loggerregex" description="Create component.js">
<target name="buildcore" depends="builddebug, -createcore, -loggerregex" description="Create component.js">
<fixcrlf srcdir="${component.builddir}" includes="${component.basefilename}.js" eol="${buildfiles.eol}" />
</target>

Expand All @@ -26,7 +26,7 @@
</target>

<!-- DEBUG -->
<target name="debugbuild" depends="-concatdebug, -registerdebug, -prependdebug, -appenddebug" description="Create component-debug.js">
<target name="builddebug" depends="-concatdebug, -registerdebug, -prependdebug, -appenddebug" description="Create component-debug.js">
<fixcrlf srcdir="${component.builddir}" includes="${component.basefilename}-debug.js" eol="${buildfiles.eol}" />
</target>

Expand All @@ -39,7 +39,7 @@
</target>

<!-- SKINS -->
<target name="-skinsbuild" depends="-concatskins" description="Create skin file in local component build directory" if="component.skins.exist">
<target name="-buildskins" depends="-concatskins" description="Create skin file in local component build directory" if="component.skins.exist">
<fixcrlf srcdir="${component.builddir}/assets/skins/sam" includes="${component}.css" eol="${buildfiles.eol}" />
</target>

Expand Down
10 changes: 5 additions & 5 deletions componentbuild/3.x/module.xml
Expand Up @@ -4,11 +4,11 @@

<import file="${builddir}/shared/targets.xml" description="Targets common to Rollup/Module" />

<target name="build" depends="corebuild, -rollupjs, skinsbuild" />
<target name="skinsbuild" depends="-skinsbuild, -rollupcss" />
<target name="build" depends="buildcore, -rollupjs, buildskins" />
<target name="buildskins" depends="-buildskins, -rollupcss" />

<!-- CORE -->
<target name="corebuild" depends="debugbuild, -createcore, -loggerregex" description="Create component.js">
<target name="buildcore" depends="builddebug, -createcore, -loggerregex" description="Create component.js">
<fixcrlf srcdir="${component.builddir}" includes="${component.basefilename}.js" eol="${buildfiles.eol}" />
</target>

Expand All @@ -26,7 +26,7 @@
</target>

<!-- DEBUG -->
<target name="debugbuild" depends="-concatdebug, -registerdebug, -prependdebug, -appenddebug" description="Create component-debug.js">
<target name="builddebug" depends="-concatdebug, -registerdebug, -prependdebug, -appenddebug" description="Create component-debug.js">
<fixcrlf srcdir="${component.builddir}" includes="${component.basefilename}-debug.js" eol="${buildfiles.eol}" />
</target>

Expand All @@ -49,7 +49,7 @@
</target>

<!-- SKINS -->
<target name="-skinsbuild" depends="-concatskins" description="Create skin rollup in local component build directory" if="component.skins.exist">
<target name="-buildskins" depends="-concatskins" description="Create skin rollup in local component build directory" if="component.skins.exist">
<fixcrlf srcdir="${component.builddir}/assets/skins/sam" includes="${component}.css" eol="${buildfiles.eol}" />
</target>

Expand Down
8 changes: 4 additions & 4 deletions componentbuild/3.x/rollup.xml
Expand Up @@ -6,9 +6,9 @@

<target name="build" depends="buildmodules" description="Create component.js"></target>

<target name="buildmodules" depends="-buildmodules, -registerall, -prependall, -appendall">
<target name="buildmodules" depends="-buildmodules, -registerall, -prependall, -appendall">
<fixcrlf srcdir="${component.builddir}" eol="${buildfiles.eol}" />
</target>
</target>

<target name="-buildmodules">
<subant target="${component.rollup.target}" inheritall="false" >
Expand All @@ -20,8 +20,8 @@
</subant>
</target>

<target name="-prependall" depends="-prependdebug, -prepend" if="component.prependfiles" />
<target name="-appendall" depends="-appenddebug, -append" if="component.appendfiles" />
<target name="-prependall" depends="-prependdebug, -prepend" if="component.prependfiles" />
<target name="-appendall" depends="-appenddebug, -append" if="component.appendfiles" />

<target name="-registerall" unless="register.skip">
<addrollup module="${component.module}" file="${component.builddir}/${component.basefilename}-debug.js" details="${component.details.hash}" />
Expand Down
23 changes: 3 additions & 20 deletions componentbuild/shared/cssmodule.xml
Expand Up @@ -4,35 +4,18 @@

<import file="${builddir}/shared/targets.xml" description="Targets common to Rollup/Module" />

<target name="build" depends="corebuild, contextbuild" />
<target name="build" depends="buildcore" />

<target name="corebuild">
<target name="buildcore">
<concatsource destfile="${component.builddir}/${component}.css" sourcedir="${component.basedir}/css" sourcefiles="${component.cssfiles}" />
</target>

<target name="contextbuild" if="component.csscontext">
<!--
<replaceregexp file="${component.builddir}/${component.basefilename}.js"
byline="${component.logger.regex.byline}"
match="${component.logger.regex}"
replace="${component.logger.regex.replace}"
flags="${component.logger.regex.flags}" />
-->
</target>

<target name="minify">
<yuicompress src="${component.builddir}/${component}.css" dest="${component.builddir}/${component}-min.css" args="${yuicompressor.css.args.internal}" />
</target>

<target name="lint">
<!-- TODO : Figure out how to use CSS lint -->
<!--
<jslint>
<jsfiles>
<fileset dir="${component.builddir}" includes="*.css" />
</jsfiles>
</jslint>
-->
<!-- TODO : CSS Lint support. Currently need to add @charset "UTF-8";-->
</target>

<target name="deploybuild" description="Copy built files to global build location">
Expand Down
89 changes: 1 addition & 88 deletions componentbuild/shared/macrolib.xml
Expand Up @@ -42,7 +42,7 @@
match="component\.details.([^\.]*)"
select="\1"
casesensitive="false" />

<var name="details" value="" />
<if>
<isset property="details.list" />
Expand All @@ -65,20 +65,6 @@
</sequential>
</macrodef>

<!-- Deprecated. Remove once everyone is over onto new build -->
<macrodef name="jsmin">
<attribute name="dir" />
<attribute name="file" />

<sequential>
<echo level="info">Running JSMin on @{dir}/@{file}</echo>
<basename file="@{file}" suffix=".js" property="basename" />
<java jar="${jsmin.jar}" output="@{dir}/${basename}-min.js" fork="true">
<arg file="@{dir}/@{file}" />
</java>
</sequential>
</macrodef>

<macrodef name="yuicompress">
<attribute name="src" />
<attribute name="dest" />
Expand All @@ -94,53 +80,6 @@
</sequential>
</macrodef>

<!-- Deprecated. Remove once everyone is over onto new build -->
<macrodef name="cssmin">
<attribute name="dir" />
<attribute name="file" />

<sequential>
<echo level="info">Running cssmin on @{dir}/@{file}</echo>

<!-- REMOVE COMMENTS -->
<replaceregexp file="@{dir}/@{file}"
byline="false"
match="/\*.*?\*/"
replace=""
flags="sg" />

<!-- REMOVE NEW LINES -->
<replaceregexp file="@{dir}/@{file}"
byline="false"
match="\r?\n"
replace=""
flags="sg" />

<!-- REMOVE ANY REMAINING UNNECESSARY WHITESPACE -->

<!-- Any whitespace around { } : ; or , -->
<replaceregexp file="@{dir}/@{file}"
byline="false"
match="\s*([{|:|;|}|,])\s*"
replace="\1"
flags="g" />

<!-- Collapse consecutive whitespace chars -->
<replaceregexp file="@{dir}/@{file}"
byline="false"
match="\s+"
replace=" "
flags="g" />

<!-- Trim -->
<replaceregexp file="@{dir}/@{file}"
byline="false"
match="(^\s+|\s+$)"
replace=""
flags="g" />
</sequential>
</macrodef>

<macrodef name="concatsource">
<attribute name="destfile" />
<attribute name="sourcedir" />
Expand Down Expand Up @@ -269,30 +208,4 @@
</sequential>
</macrodef>

<macrodef name="asdoc">
<sequential>
<!-- WORK IN PROGRESS, HARDCODED VALUES -->
<property name="flex.home" value="C:/dev/flexsdk3" />
<property name="asdoc.class" value="flex2.tools.ASDoc" />
<property name="asdoc.templatepath" value="${flex.home}/asdoc/templates" />
<property name="asdoc.windowtitle" value="YUI Flash Component Documentation" />
<property name="asdoc.maintitle" value="YUI Flash Component Documentation" />

<java className="${asdoc.class}" fork="true" failonerror="true">
<classpath>
<fileset dir="${flex.home}/lib" includes="*.jar" />
</classpath>
<jvmarg line="-Dapplication.home=${flex.home} -Xms32m -Xmx768m -Dsun.io.useCanonCaches=false -Xbootclasspath/p:${flex.home}/lib/xalan.jar"/>
<arg line="-source-path+='${srcdir}/src/charts/as'"/>
<arg line="-source-path+='${srcdir}/src/uploader/as'"/>
<arg line="-library-path+='${srcdir}/src/charts/as/charts.swc'" />
<arg line="-doc-sources+='${srcdir}/src/charts/as'"/>
<arg line="-doc-sources+='${srcdir}/src/uploader/as'"/>
<arg line="-window-title '${asdoc.windowtitle}'"/>
<arg line="-main-title '${asdoc.maintitle}'"/>
<arg line="-templates-path '${asdoc.templatepath}'"/>
<arg line="-output '${srcdir}/as-docs'"/>
</java>
</sequential>
</macrodef>
</project>
7 changes: 0 additions & 7 deletions componentbuild/shared/properties.xml
Expand Up @@ -17,7 +17,6 @@
<property name="buildfiles.eol" value="lf"/>

<!-- Supporting Tools -->
<property name="jsmin.jar" location="${builddir}/lib/jsmin/jsmin.jar" />
<property name="rhino.jar" location="${builddir}/lib/rhino/js.jar" />
<property name="jslintconsole.js" location="${builddir}/lib/jslint/jslint-console.js" />
<property name="jslintsrc.js" location="${builddir}/lib/jslint/fulljslint.js" />
Expand Down Expand Up @@ -72,12 +71,6 @@
<property name="component.logger.regex.flags" value="mg" />
<property name="component.logger.regex.byline" value="false" />

<!-- Default csscontext support: Adds a csscontext in front of every rule in a CSS file -->
<property name="component.csscontext.regex" value="CSSCONTEXT_TODO" />
<property name="component.csscontext.regex.replace" value="CSSCONTEXT_TODO" />
<property name="component.csscontext.regex.flags" value="mg" />
<property name="component.csscontext.regex.byline" value="false" />

<!-- Rollup Support -->
<property name="component.rollup" value="false"/>
<property name="component.rollup.target" value="all"/>
Expand Down
11 changes: 0 additions & 11 deletions componentbuild/shared/targets.xml
Expand Up @@ -72,17 +72,6 @@
</target>

<target name="deployskins" if="component.skins.exist">

<!--
<copy todir="${global.build.component.assets}/skins/sam" preservelastmodified="true">
<fileset dir="${component.assets.base}/skins/sam" includes="${component}-skin.css" />
</copy>
<copy todir="${global.build.component.assets}" preservelastmodified="true">
<fileset dir="${component.assets.base}" includes="${component}-core.css" />
</copy>
-->

<copy todir="${global.build.component.assets}/skins/sam" preservelastmodified="true">
<fileset dir="${component.builddir}/assets/skins/sam" includes="${component}.css" />
</copy>
Expand Down

0 comments on commit b2ae49b

Please sign in to comment.