Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Added sub dir walking to assets/skins dir to support more than one skin

  • Loading branch information...
commit 057e455b1030e842143acc853ef1181a0ff1aba2 1 parent 3c2a7bb
@davglass authored
Showing with 60 additions and 12 deletions.
  1. +43 −5 componentbuild/3.x/module.xml
  2. +17 −7 componentbuild/shared/targets.xml
View
48 componentbuild/3.x/module.xml
@@ -64,7 +64,18 @@
<!-- SKINS -->
<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}" />
+ <for param="skin.dir">
+ <path>
+ <dirset dir="${component.assets.base}/skins/" includes="*"/>
+ </path>
+ <sequential>
+ <local name="skin.name"/>
+ <basename property="skin.name" file="@{skin.dir}"/>
+ <echo level="info">Fixing CRLF for Skin files for @{skin.dir} :: ${skin.name}</echo>
+ <fixcrlf srcdir="${component.builddir}/assets/skins/${skin.name}" includes="${component}.css" eol="${buildfiles.eol}" />
+ </sequential>
+ </for>
+ <!--fixcrlf srcdir="${component.builddir}/assets/skins/sam" includes="${component}.css" eol="${buildfiles.eol}" /-->
</target>
<target name="-buildlangs" description="Create language packs in the local component build directory" if="component.langs.exist">
@@ -94,15 +105,42 @@
</target>
<target name="-concatskins" if="component.skins.exist">
- <concatsource destfile="${component.builddir}/assets/skins/sam/${component}.css" sourcedir="${component.assets.base}" sourcefiles="${component}-core.css, skins/sam/${component}-skin.css" />
- <yuicompress type="css" src="${component.builddir}/assets/skins/sam/${component}.css" dest="${component.builddir}/assets/skins/sam/${component}.css" args="${yuicompressor.css.args.internal}" />
+ <echo level="info">Concating Skins</echo>
+ <for param="skin.dir">
+ <path>
+ <dirset dir="${component.assets.base}/skins/" includes="*"/>
+ </path>
+ <sequential>
+ <local name="skin.name"/>
+ <basename property="skin.name" file="@{skin.dir}"/>
+ <echo level="info">Concating Skin files for @{skin.dir} :: ${skin.name}</echo>
+ <concatsource destfile="${component.builddir}/assets/skins/${skin.name}/${component}.css" sourcedir="${component.assets.base}" sourcefiles="${component}-core.css, skins/${skin.name}/${component}-skin.css" />
+ <yuicompress type="css" src="${component.builddir}/assets/skins/${skin.name}/${component}.css" dest="${component.builddir}/assets/skins/${skin.name}/${component}.css" args="${yuicompressor.css.args.internal}" />
+ </sequential>
+ </for>
+
+ <!--concatsource destfile="${component.builddir}/assets/skins/sam/${component}.css" sourcedir="${component.assets.base}" sourcefiles="${component}-core.css, skins/sam/${component}-skin.css" />
+ <yuicompress type="css" src="${component.builddir}/assets/skins/sam/${component}.css" dest="${component.builddir}/assets/skins/sam/${component}.css" args="${yuicompressor.css.args.internal}" /-->
</target>
<target name="-rollupcss" if="rollupskins">
<echo level="info">Rolling up ${component}.css into ${rollup.component}.css</echo>
- <concat destfile="${rollup.builddir}/assets/skins/sam/${rollup.component}.css" append="true" fixlastline="true">
+ <for param="skin.dir">
+ <path>
+ <dirset dir="${component.assets.base}/skins/" includes="*"/>
+ </path>
+ <sequential>
+ <local name="skin.name"/>
+ <basename property="skin.name" file="@{skin.dir}"/>
+ <echo level="info">Concating Skin files for @{skin.dir} :: ${skin.name}</echo>
+ <concat destfile="${rollup.builddir}/assets/skins/${skin.name}/${rollup.component}.css" append="true" fixlastline="true">
+ <filelist dir="${component.builddir}/assets/skins/${skin.name}" files="${component}.css" />
+ </concat>
+ </sequential>
+ </for>
+ <!--concat destfile="${rollup.builddir}/assets/skins/sam/${rollup.component}.css" append="true" fixlastline="true">
<filelist dir="${component.builddir}/assets/skins/sam" files="${component}.css" />
- </concat>
+ </concat-->
</target>
<!-- Tests -->
View
24 componentbuild/shared/targets.xml
@@ -123,13 +123,23 @@
</target>
<target name="deployskins" if="skins.exist">
- <copy todir="${global.build.component.assets}/skins/sam" overwrite="true" verbose="true">
- <fileset dir="${component.builddir}/assets/skins/sam" includes="${component}.css" />
- </copy>
-
- <copy todir="${global.build.component.assets}/skins/sam" overwrite="true" verbose="true">
- <fileset dir="${component.assets.skins.base}/sam" includes="${component.assets.skins.files}" />
- </copy>
+ <for param="skin.dir">
+ <path>
+ <dirset dir="${component.assets.base}/skins/" includes="*"/>
+ </path>
+ <sequential>
+ <local name="skin.name"/>
+ <basename property="skin.name" file="@{skin.dir}"/>
+ <echo level="info">Deploying Skin files for @{skin.dir} :: ${skin.name}</echo>
+ <copy todir="${global.build.component.assets}/skins/${skin.name}" overwrite="true" verbose="true">
+ <fileset dir="${component.builddir}/assets/skins/${skin.name}" includes="${component}.css" />
+ </copy>
+
+ <copy todir="${global.build.component.assets}/skins/${skin.name}" overwrite="true" verbose="true">
+ <fileset dir="${component.assets.skins.base}/${skin.name}" includes="${component.assets.skins.files}" />
+ </copy>
+ </sequential>
+ </for>
</target>
<target name="deploylang" description="Copy language bundles to global build location">
Please sign in to comment.
Something went wrong with that request. Please try again.