erik-kallen/SaltarelleCompiler — pull request #195 by ProdigySim (2013-05-06 18:48:00+00:00)
Title: Adds the AdditionalDependencyAttribute, which lets AMD-style assemblies ...

...specify additional module dependencies manually.

This allows a developer to accomplish a number of important AMD tasks that are otherwise difficult to do.

**1. Specifying a dependency on a "plugin" or other library that Saltarelle would not naturally produce a dependency for.**
I used this for the jQuery "Verimail" plugin, which (in my use) only adds methods to jQuery objects. While I have headers for Verimail in C# code, since I never call any Verimail methods without already having a jQueryObject instance--which doesn't trigger Saltarelle to see it as a dependency.

**2. Injecting jQuery as an AMD dependency**
While kind of a hack, I didn't see a great way to do this without forking Saltarelle.jQuery. Using ````[AdditionalDependency("jquery", "$")]```` lets me add it as an AMD dependency in-place for all my projects as a correct shim.

**3. Adding a shim to use mscorlib as an AMD module**
While I understand there is probably a nicer way to make this happen, this allows me to write my own mscorlib shimming layer and insert it as a fake dependency, e.g. ````[AdditionalDependency("mscorlib-shim", "ss")]````

Awaiting your feedback. :)