jpettersson/lingon — pull request #45 by jpettersson (2014-06-30 11:46:14+00:00)
Title: Template context

EJS template context was a bit of a mess, everything was access on the global property "config" inside the EJS context. Also, It was necessary to provide a separate config object per Lingon task. So if you wanted to use some variable in both `build` and `server` you had to write boilerplate code such as:

```JavaScript
var config = {something: "shared between tasks"}
lingon.configurations['build'] = config;
lingon.configurations['server'] = config;
```

This change renames "configurations" to "context" and provides only one object, regardless of what task is run. The proper way to change values per task is to listen to the Lingon events and mutate the context, for instance:

```JavaScript
// 'bob' will be used during build
lingon.context.name = "bob";

// 'bob' is overwritten with 'alice' when the server starts
lingon.bind('serverConfigure', function() {
lingon.context.name = "alice";
});
```

This is an API breaking change, but the old way was just way to messy to keep around. It will be properly documented in release 1.0.0.