systemjs/systemjs — pull request #190 by guybedford (2014-08-23 06:07:07+00:00)
Title: Global module dependency shim layer

This creates a new meta configuration option, `globals`, allowing global modules to depend on non-globals. This effectively stops the global format from being a dominating format (since globals can only depend on globals) to a format that plays well just like any other.

The configuration works with:

```javascript
System.meta['global/module'] = {
globals: {
'$': 'jquery'
}
};
```

The above will support multi-versions of the `$` global, and a closure is created so that even if the object is rewritten later, the global module will still have the correct access.

In the above, `jquery` is normalized relative to the global module and can be ES6, AMD, CommonJS etc itself.

The necessary adjustments to meta are also made to allow this same thing to be specified with meta syntax:

```javascript
"format global";
"globals.$ jquery";
```

Whether that is useful is yet to be seen, but it was an easy feature.

As part of this, I've removed the `init` function. If there are still valid use cases for `init` that aren't handled by the above please let me know to reconsider keeping it in.

This resolves https://github.com/systemjs/systemjs/issues/148.