riganti/redwood — pull request #16 by exyi (2014-12-29 10:00:52+00:00)
Title: Script and style manager

Added resource repository and manager.
Resource is anything added once to html page that is required by some control - typically script or style. Resources are named and registered in global repository, they can be referenced in resource manager and then links to them rendered using `rw:ResourceLinks` control.
Resource manager can be found in `RedwoodRequestContext.ResourceManager` and resource added like
```C#
context.ResourceManager.AddResource("knockout"); // adds reference to bootstrap including all dependencies (jquery)
```
If you are in control you can use `ResourceDependencies` property.

Registrations in repository can be done in startup method. Like:
```C#
redwoodConfiguration.ResourceRepo.Register("jquery", new ScriptResource("Scripts/jquery.js"));
```
And you can register jquery, knockout, bootstrap and redwood using extension method `RegisterCommonResources`.