You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@wookie.apache.org by Scott Wilson <sc...@gmail.com> on 2011/11/29 14:38:40 UTC

Template instructions incorrect?

I've just tried out the instructions in /wookie/widgets/templates/readme to generate a test widget:

  * cd widgets
  * mkdir helloWorld
  * create a file called "./widget.properties"
  * open widget.properties in your favourite editor and add the following:
    * template.name=base
    * widget.shortname=HelloWorld
    * widget.name=Hello World
    * 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>
  * Ensure that Wookie is running locally
  * ant generate-widgets -D widget.include==helloWorld
  * take a look at your new widget in your local instance of Wookie

Unfortunately, I get:

Scotts-MacBook-Pro:templates scottw$ ant generate-widgets -Dwidget.include=helloWorld
Buildfile: /Users/scottw/Documents/workspace2/wookie/widgets/templates/build.xml

generate-widgets:
     [echo] +------------------------------------------+
     [echo] |                                          |
     [echo] |  Generating widgets                      |
     [echo] |  include: helloWorld              |
     [echo] |  in: /Users/scottw/Documents/workspace2/wookie/widgets/templates                          |
     [echo] |                                          |
     [echo] +------------------------------------------+

BUILD FAILED
/Users/scottw/Documents/workspace2/wookie/widgets/templates/build.xml:50: /Users/scottw/Documents/workspace2/wookie/widgets/templates/widgets does not exist.

Total time: 0 seconds

- S

Re: Template instructions incorrect?

Posted by Ross Gardler <rg...@opendirective.com>.
Not wrong, just misleading ;-)

The line before the ones you copy below says "starting in the
templating systems root directory", but there was no widgets folder in
there. I created that, so the instructions are now right as written
(we have too many widgets folders, it's very confusing).

I'll update the docs for clarity and also document how you can create
a widgets directory wherever you want.

NB The contract that is producing this templating code is coming to an
end, my last responsibility is to make the templating system more
generally useful. There are plenty of rough edges right now, if you
are testing it would be really useful for you to let me know which
ones cut you first. Currently my initial plan is to make the plain
templates look better (and more general). But please hit me with your
pain points, I'll prioritise according to your experiences.

Ross

On 29 November 2011 13:38, Scott Wilson <sc...@gmail.com> wrote:
> I've just tried out the instructions in /wookie/widgets/templates/readme to generate a test widget:
>
>  * cd widgets
>  * mkdir helloWorld
>  * create a file called "./widget.properties"
>  * open widget.properties in your favourite editor and add the following:
>    * template.name=base
>    * widget.shortname=HelloWorld
>    * widget.name=Hello World
>    * 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>
>  * Ensure that Wookie is running locally
>  * ant generate-widgets -D widget.include==helloWorld
>  * take a look at your new widget in your local instance of Wookie
>
> Unfortunately, I get:
>
> Scotts-MacBook-Pro:templates scottw$ ant generate-widgets -Dwidget.include=helloWorld
> Buildfile: /Users/scottw/Documents/workspace2/wookie/widgets/templates/build.xml
>
> generate-widgets:
>     [echo] +------------------------------------------+
>     [echo] |                                          |
>     [echo] |  Generating widgets                      |
>     [echo] |  include: helloWorld              |
>     [echo] |  in: /Users/scottw/Documents/workspace2/wookie/widgets/templates                          |
>     [echo] |                                          |
>     [echo] +------------------------------------------+
>
> BUILD FAILED
> /Users/scottw/Documents/workspace2/wookie/widgets/templates/build.xml:50: /Users/scottw/Documents/workspace2/wookie/widgets/templates/widgets does not exist.
>
> Total time: 0 seconds
>
> - S



-- 
Ross Gardler (@rgardler)
Programme Leader (Open Development)
OpenDirective http://opendirective.com