madskristensen/WebEssentials2013 — pull request #907 by gcastre (2014-04-14 16:56:39+00:00)
Title: [TypeScript] Change for generated files

- Fix for nested enum in class
- Fix for the reference path that can be duplicated
- Add a config option to enable/disable camelCasing for enum values
- Add a config option to add TypeScript reference path in .d.ts files

Fix for nested file, if you have a class like this:
``` c#
class Car
{
public string Name { get; set; }
public Color Color { get; set; }
internal enum Color { Red, Blue }
}
```
Curently generate:

``` c#
declare module server {
interface Car {
Name: string;
Color: server.Color;
}
}
```
server.Color is not defined in the server module, intellisense raise an error.
Now it generate this:
``` c#
declare module server {
enum Color {
Red,
Blue,
}
interface Car {
name: string;
color: server.Color;
}
}
```
-----
BTW: I've notice that the IntellisenseParser and the ScriptIntellisenseListener share the same code listening to the change on the file. This cause the c# class to be generated in typescript (or javascript) twice. I have made the change in a branch on my repo you can see here https://github.com/gcastre/WebEssentials2013/commit/129251e52791f26df027c6af3c5936422a56c1f7