Quantcast
Channel: Node.js Tools for Visual Studio
Viewing all articles
Browse latest Browse all 4630

Commented Feature: TypeScript Support [291]

$
0
0
Hey there, I tried so hard trying to use TypeScript, but using nodeJS project doesn't seem to support TypeScript VS builders.

I tried modifying the project file:

```
<PropertyGroup Condition="'$(Configuration)' == 'Debug'">
<TypeScriptSourceMap> --module AMD</TypeScriptSourceMap>
</PropertyGroup>
<Target Name="BeforeBuild">
<Message Text="Compiling TypeScript files" />
<Message Text="Executing tsc$(TypeScriptSourceMap) @(TypeScriptCompile ->'"%(fullpath)"', ' ')" />
<Exec Command="tsc$(TypeScriptSourceMap) @(TypeScriptCompile ->'"%(fullpath)"', ' ')" />
</Target>
```

I believe the ProjectExtensions is what conflicting:

```
<ProjectExtensions>
<VisualStudio>
<FlavorProperties GUID="{349c5851-65df-11da-9384-00065b846f21}">
<WebProjectProperties>
<UseIIS>True</UseIIS>
<AutoAssignPort>True</AutoAssignPort>
<DevelopmentServerPort>0</DevelopmentServerPort>
<DevelopmentServerVPath>/</DevelopmentServerVPath>
<IISUrl>http://localhost:2361/</IISUrl>
<NTLMAuthentication>False</NTLMAuthentication>
<UseCustomServer>False</UseCustomServer>
<CustomServerUrl>
</CustomServerUrl>
<SaveServerSettingsInUserFile>False</SaveServerSettingsInUserFile>
</WebProjectProperties>
</FlavorProperties>
</VisualStudio>
</ProjectExtensions>
```

The code I am running is the following:

```
///<reference path='node.d.ts'/>

import http = module('http');

var port = process.env.port || 1337;

http.createServer((req, res) => {
res.writeHead(200, { 'Content-Type': 'text/plain' });
res.end('Hello World\n');
}).listen(port, () => {
console.log("Listening on", port);
});
```

Please make integration with TypeScript possible before release, It becomes a hassle for me to compile stuff outside VS everytime. If I wanted to do that, then I could just use webmatrix or sublime.

Thanks :)
Comments: I had this issue but figure out that I was missing the 'TypeScriptToolsVersion' xmlelement. I'm running 2013 with the public node.js and typescript installs, not the web essentials. Hope that helps...

Viewing all articles
Browse latest Browse all 4630

Trending Articles