BladeRunnerJS/brjs — pull request #785 by janhancic (2014-06-30 14:18:25+00:00)
Title: Allow `require('br/ServiceRegistry').getService()

to be called in the module itself (outside of a method).

This is just a hack for now.

It hardcodes the `setAliasData` for the dashboard app as I couldn't move
it to the correct location any other way.

The basic "trick" is to change `class` to `requirePath` and only require
the actual class in the AliasRegistry when `getClass` is first called.

TODO:
- add back checks to `AliasRegistry` that check if class implements
interface
- split the 'globalisation code' into a seperate plugin so that the
`AliasingContentPlugin` can correctly declare when it should be run,
that will allow the `setAliasData` to be outputed after any class
declarations but before the 'globalisation' code
- fix `AliasRegistry` tests
- fix Java tests
- fix any potential services in the same way that BRHtmlResourceService
was fixed