You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@wookie.apache.org by rg...@apache.org on 2011/10/31 02:37:53 UTC
svn commit: r1195298 - in /incubator/wookie/trunk/widgets/templates:
build.xml readme.txt
Author: rgardler
Date: Mon Oct 31 01:37:53 2011
New Revision: 1195298
URL: http://svn.apache.org/viewvc?rev=1195298&view=rev
Log:
add the ability for widget families to define common files
Modified:
incubator/wookie/trunk/widgets/templates/build.xml
incubator/wookie/trunk/widgets/templates/readme.txt
Modified: incubator/wookie/trunk/widgets/templates/build.xml
URL: http://svn.apache.org/viewvc/incubator/wookie/trunk/widgets/templates/build.xml?rev=1195298&r1=1195297&r2=1195298&view=diff
==============================================================================
--- incubator/wookie/trunk/widgets/templates/build.xml (original)
+++ incubator/wookie/trunk/widgets/templates/build.xml Mon Oct 31 01:37:53 2011
@@ -98,6 +98,16 @@
<copy todir="${widget.build.dir}/${widget.shortname}"
overwrite="true"
failonerror="false">
+ <fileset dir="../common">
+ <exclude name="widget.properties"/>
+ </fileset>
+ <filterchain>
+ <expandproperties/>
+ </filterchain>
+ </copy>
+ <copy todir="${widget.build.dir}/${widget.shortname}"
+ overwrite="true"
+ failonerror="false">
<fileset dir=".">
<exclude name="widget.properties"/>
</fileset>
@@ -110,6 +120,13 @@
<copy todir="${widget.build.dir}/${widget.shortname}/images"
overwrite="true"
failonerror="false">
+ <fileset dir="../common/images">
+ <include name="**/*.*"/>
+ </fileset>
+ </copy>
+ <copy todir="${widget.build.dir}/${widget.shortname}/images"
+ overwrite="true"
+ failonerror="false">
<fileset dir="./images">
<include name="**/*.*"/>
</fileset>
@@ -119,6 +136,17 @@
<copy todir="${widget.build.dir}/${widget.shortname}/scripts"
overwrite="true"
failonerror="false">
+ <fileset dir="../common/scripts">
+ <include name="**/*.js"/>
+ <exclude name="**/*_controller.js"/>
+ </fileset>
+ <filterchain>
+ <expandproperties/>
+ </filterchain>
+ </copy>
+ <copy todir="${widget.build.dir}/${widget.shortname}/scripts"
+ overwrite="true"
+ failonerror="false">
<fileset dir="./scripts">
<include name="**/*.js"/>
<exclude name="**/*_controller.js"/>
@@ -154,10 +182,18 @@
<copy todir="${widget.build.dir}/${widget.shortname}/style"
overwrite="true"
failonerror="false">
+ <fileset dir="../common/style">
+ <include name="**/*.css"/>
+ </fileset>
+ </copy>
+ <copy todir="${widget.build.dir}/${widget.shortname}/style"
+ overwrite="true"
+ failonerror="false">
<fileset dir="./style">
<include name="**/*.css"/>
</fileset>
</copy>
+
<concat destfile="${widget.build.dir}/${widget.shortname}/style/all.css.new"
fixlastline="true">
<fileset dir="${widget.build.dir}/${widget.shortname}/style"
@@ -177,6 +213,13 @@
<copy todir="${widget.build.dir}/${widget.shortname}/lib"
overwrite="true"
failonerror="false">
+ <fileset dir="../common/lib">
+ <include name="**/*.*"/>
+ </fileset>
+ </copy>
+ <copy todir="${widget.build.dir}/${widget.shortname}/lib"
+ overwrite="true"
+ failonerror="false">
<fileset dir="./lib">
<include name="**/*.*"/>
</fileset>
@@ -186,6 +229,13 @@
<copy todir="${widget.build.dir}/${widget.shortname}/legal"
overwrite="true"
failonerror="false">
+ <fileset dir="../common/legal">
+ <include name="**/*.*"/>
+ </fileset>
+ </copy>
+ <copy todir="${widget.build.dir}/${widget.shortname}/legal"
+ overwrite="true"
+ failonerror="false">
<fileset dir="./legal">
<include name="**/*.*"/>
</fileset>
Modified: incubator/wookie/trunk/widgets/templates/readme.txt
URL: http://svn.apache.org/viewvc/incubator/wookie/trunk/widgets/templates/readme.txt?rev=1195298&r1=1195297&r2=1195298&view=diff
==============================================================================
--- incubator/wookie/trunk/widgets/templates/readme.txt (original)
+++ incubator/wookie/trunk/widgets/templates/readme.txt Mon Oct 31 01:37:53 2011
@@ -269,7 +269,6 @@ to a locally running Wookie server. Once
executed you can examine your widget in action.
-
** Adding some style
This section builds on the previous tutorial. We will add some simple
@@ -352,6 +351,16 @@ them in a "lib" directory in the root of
to add any copyright notices and licenses to a "NOTICE" file and
"legal" directory respectfully.
+** Common Files
+When building a family of related widgets you are likely to provide a
+set of common files that will be reused by multiple widgets. These can
+be placed in a directory called "common" in the same directory as your
+widget definitions. All files in this folder will be copied, with
+token replacement, into each widget.
+
+Because we use token replacement in these files too, it is possible
+for each widget to customise the common files appropriately.
+
* Building widgets
** Building test widgets