ariatemplates/hashspace — pull request #182 by b-laporte (2014-05-25 18:17:07+00:00)
Title: global variables support

This PR adds the possibility to declare some variables in a global scope so that they don't need to be redefined in each template scope. The main target for this feature will be components, component libraries, or general transformation functions (e.g. *orderBy*).

Here is the sample integrated in the PR:
```
var hsp=require("hsp/rt");

# template item(text,value)
{if value}

{text}

{value}

{/if}
# /template

hsp.global.label=item;
hsp.global.ln={personDetails:"Person details"};

# template test(person)

<#label text="First Name: " value="{person.firstName}"/>
<#label text="Last Name: " value="{person.lastName}"/>

# /template

// render template in the #output div
test({firstName:"Homer",lastName:"Simpson"}).render("output");
```

Note: I have also added a new grunt task (i.e. **tddrt**) in order to run the run-time tests in the browser with server-side compilation. Apart from the fact that client-side compilation is much slower, it seems as well that debugging is next to impossible (chrome seems to lose the debug line...?). Main readme file has been updated accordingly.