Author: rgardler
Date: Tue Nov 29 14:50:33 2011
New Revision: 1207893
URL: http://svn.apache.org/viewvc?rev=1207893&view=rev
Log:
make hellowWorld instructions clearer and document how to create your own
widget definitions directory
Added:
incubator/wookie/trunk/widgets/templates/widgets/
incubator/wookie/trunk/widgets/templates/widgets/build.xml (with props)
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=1207893&r1=1207892&r2=1207893&view=diff
==============================================================================
--- incubator/wookie/trunk/widgets/templates/build.xml (original)
+++ incubator/wookie/trunk/widgets/templates/build.xml Tue Nov 29 14:50:33 2011
@@ -20,7 +20,8 @@
<property name="project.build.dir" location="${wookie.root.dir}/build"/>
<property name="template.dir" location="."/>
<property name="widget.build.dir" location="./build"/>
-
+ <property name="widget.defintions.dir" location="widgets"/>
+
<import file="${wookie.root.dir}/widgets/build.xml"/>
<target name="build-widget">
@@ -48,7 +49,7 @@
<subant target="_generate_and_deploy_widget"
genericantfile="${basedir}/build.xml"
inheritall="true">
- <dirset dir="widgets">
+ <dirset dir="${widget.definitions.dir}">
<include name="${widget.include}"/>
<exclude name="common"/>
</dirset>
Modified: incubator/wookie/trunk/widgets/templates/readme.txt
URL:
http://svn.apache.org/viewvc/incubator/wookie/trunk/widgets/templates/readme.txt?rev=1207893&r1=1207892&r2=1207893&view=diff
==============================================================================
--- incubator/wookie/trunk/widgets/templates/readme.txt (original)
+++ incubator/wookie/trunk/widgets/templates/readme.txt Tue Nov 29 14:50:33 2011
@@ -233,10 +233,7 @@ defined by your widget. Check the detail
In this section we will create a simple widget that says hello to the
world (what else would the first widget be?)
-Starting in the templating systems root directory run the following
-commands:
-
- * cd widgets
+ * cd [WOOKIE_HOME/widgets/template/widget
* mkdir helloWorld
* create a file called "./widget.properties"
* open widget.properties in your favourite editor and add the following:
@@ -246,7 +243,12 @@ commands:
* widget.description=A very friendly widget to demonstrate how easy it is
to build a widget from templates.
* Create a file called "content_primary.html" and the following content
* <p>Hello World!</p>
+
+That's it, you have built your first template based widget. Now you
+need to generate and deploy it:
+
* Ensure that Wookie is running locally
+ * cd [WOOKIE_HOME]/widgets/template
* ant generate-widgets -D widget.include==helloWorld
* take a look at your new widget in your local instance of Wookie
@@ -299,6 +301,16 @@ to a locally running Wookie server. Once
executed you can examine your widget in action.
+**** Advanced Topics
+
+***** Your own widgets directory
+
+You can create a widgets directory anywhere you want it. To create
+your own directory for widget definitions simply create the directory
+and copy [WOOKIE_HOME]/widgets/template/widgets/build.xml into your
+new directory. Then edit the value of the "wookie.root.dir" property
+so that it points to the root of your Wookie src folder.
+
** Adding some style
This section builds on the previous tutorial. We will add some simple
Added: incubator/wookie/trunk/widgets/templates/widgets/build.xml
URL:
http://svn.apache.org/viewvc/incubator/wookie/trunk/widgets/templates/widgets/build.xml?rev=1207893&view=auto
==============================================================================
--- incubator/wookie/trunk/widgets/templates/widgets/build.xml (added)
+++ incubator/wookie/trunk/widgets/templates/widgets/build.xml Tue Nov 29
14:50:33 2011
@@ -0,0 +1,30 @@
+<?xml version="1.0"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<project basedir="." name="Wookie_widgets_from_templates_build_file">
+
+ <!-- To create your own widgets directory copy this
+ build file into it and change the value of
+ wookie.root.dir -->
+ <property name="wookie.root.dir" location="../../.."/>
+
+ <property name="widget.definitions.dir" location="."/>
+ <property name="wookie.template.dir"
location="${wookie.root.dir}/widgets/templates"/>
+ <property name="template.dir" location="${wookie.template.dir}"/>
+
+ <import file="${wookie.template.dir}/build.xml"/>
+</project>
\ No newline at end of file
Propchange: incubator/wookie/trunk/widgets/templates/widgets/build.xml
------------------------------------------------------------------------------
svn:mime-type = text/xml