Last active
December 11, 2015 05:58
-
-
Save masaru-b-cl/4556141 to your computer and use it in GitHub Desktop.
Visual Studio Advent Calendar 2012 sample code
TypeScriptでWSHを書いちゃおう #visualstudio – @masaru_b_cl « be free http://takanosho.wordpress.com/2012/12/24/visual-studio-advent-calendar-2012/
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Thumbs.db | |
*.obj | |
*.exe | |
*.pdb | |
*.user | |
*.aps | |
*.pch | |
*.vspscc | |
*_i.c | |
*_p.c | |
*.ncb | |
*.suo | |
*.sln.docstates | |
*.tlb | |
*.tlh | |
*.bak | |
*.cache | |
*.ilk | |
*.log | |
[Bb]in | |
[Dd]ebug*/ | |
*.lib | |
*.sbr | |
obj/ | |
[Rr]elease*/ | |
_ReSharper*/ | |
[Tt]est[Rr]esult* | |
*.vssscc | |
$tf*/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
\.git |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="shift_jis" ?> | |
<job id="main"> | |
<script src="greeter.js" language="JScript"></script> | |
<script src="main.js" language="JScript"></script> | |
</job> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var TAKANO; | |
(function (TAKANO) { | |
(function (Sho) { | |
var Greeter = (function () { | |
function Greeter(name) { | |
this.name = name; | |
} | |
Greeter.prototype.greet = function () { | |
WScript.Echo("Hello " + this.name + "!"); | |
}; | |
return Greeter; | |
})(); | |
Sho.Greeter = Greeter; | |
})(TAKANO.Sho || (TAKANO.Sho = {})); | |
var Sho = TAKANO.Sho; | |
})(TAKANO || (TAKANO = {})); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"version":3,"file":"greeter.js","sources":["greeter.ts"],"names":["TakanoSho","TakanoSho.Greeter","TakanoSho.Greeter.constructor","TakanoSho.Greeter.greet"],"mappings":"AAAA,IAAO,SAAS;AAQf,CARD,UAAO,SAAS;IACdA;QACEC,SADWA,OAAOA,CACLA,IAAmBA;YAAnBC,SAAWA,GAAJA,IAAIA;AAAQA,QAAGA,CAACA;QAEpCD,0BAAAA;YACEE,OAAOA,CAACA,IAAIA,CAACA,QAAQA,GAAGA,IAAIA,CAACA,IAAIA,GAAGA,GAAGA,CAACA;QAC1CA,CAACA;QACHF;AAACA,IAADA,CAACA,IAAAD;IANDA,4BAMCA,IAAAA;AACHA,CAACA;AAAA"} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var TAKANO;(function(n){(function(n){var t=function(){function n(n){this.name=n}return n.prototype.greet=function(){WScript.Echo("Hello "+this.name+"!")},n}();n.Greeter=t})(n.Sho||(n.Sho={}));var t=n.Sho})(TAKANO||(TAKANO={})) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module TAKANO.Sho { | |
export class Greeter { | |
constructor (public name: string) {} | |
greet() { | |
WScript.Echo("Hello " + this.name + "!"); | |
} | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var greeter = new TAKANO.Sho.Greeter("Sho"); | |
greeter.greet(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"version":3,"file":"main.js","sources":["main.ts"],"names":[""],"mappings":"AAAA,IAEI,OAAO,GAAG,IAAI,SAAS,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;AAC3C,OAAO,CAAC,KAAK,EAAE;AACf"} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"1" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// <reference path="greeter.ts"/> | |
var greeter = new TAKANO.Sho.Greeter("Sho"); | |
greeter.greet(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | |
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> | |
<PropertyGroup> | |
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> | |
<ProjectGuid>{1A09617A-1E3A-4420-BAA9-C117C5FEFBE4}</ProjectGuid> | |
<ProjectTypeGuids>{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids> | |
<OutputType>Library</OutputType> | |
<OutputPath>bin</OutputPath> | |
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion> | |
<DebugType>full</DebugType> | |
<DebugSymbols>true</DebugSymbols> | |
<FileUpgradeFlags> | |
</FileUpgradeFlags> | |
<OldToolsVersion>4.0</OldToolsVersion> | |
<UseIISExpress>true</UseIISExpress> | |
<IISExpressSSLPort /> | |
<IISExpressAnonymousAuthentication /> | |
<IISExpressWindowsAuthentication /> | |
<IISExpressUseClassicPipelineMode /> | |
<UpgradeBackupLocation /> | |
</PropertyGroup> | |
<PropertyGroup> | |
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion> | |
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath> | |
</PropertyGroup> | |
<PropertyGroup> | |
<RootNamespace>WSHSample</RootNamespace> | |
</PropertyGroup> | |
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> | |
<Import Project="$(VSToolsPath)\WebApplications\Microsoft.WebApplication.targets" Condition="'$(VSToolsPath)' != ''" /> | |
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets" Condition="false" /> | |
<ProjectExtensions> | |
<VisualStudio> | |
<FlavorProperties GUID="{349c5851-65df-11da-9384-00065b846f21}"> | |
<WebProjectProperties> | |
<UseIIS>True</UseIIS> | |
<AutoAssignPort>True</AutoAssignPort> | |
<DevelopmentServerPort>0</DevelopmentServerPort> | |
<DevelopmentServerVPath>/</DevelopmentServerVPath> | |
<IISUrl>http://localhost:14510/</IISUrl> | |
<NTLMAuthentication>False</NTLMAuthentication> | |
<UseCustomServer>False</UseCustomServer> | |
<CustomServerUrl> | |
</CustomServerUrl> | |
<SaveServerSettingsInUserFile>False</SaveServerSettingsInUserFile> | |
</WebProjectProperties> | |
</FlavorProperties> | |
</VisualStudio> | |
</ProjectExtensions> | |
<PropertyGroup Condition="'$(Configuration)' == 'Debug'"> | |
<TypeScriptSourceMap> --sourcemap</TypeScriptSourceMap> | |
</PropertyGroup> | |
<ItemGroup> | |
<TypeScriptCompile Include="greeter.ts" /> | |
</ItemGroup> | |
<ItemGroup> | |
<Content Include="greeter.js.map"> | |
<DependentUpon>greeter.ts</DependentUpon> | |
</Content> | |
<Content Include="greeter.min.js"> | |
<DependentUpon>greeter.ts</DependentUpon> | |
</Content> | |
<Content Include="main.js"> | |
<DependentUpon>main.ts</DependentUpon> | |
</Content> | |
<Content Include="main.min.js"> | |
<DependentUpon>main.ts</DependentUpon> | |
</Content> | |
<TypeScriptCompile Include="main.ts" /> | |
</ItemGroup> | |
<ItemGroup> | |
<Content Include="greeter.js"> | |
<DependentUpon>greeter.ts</DependentUpon> | |
</Content> | |
<Content Include="execute.wsf" /> | |
</ItemGroup> | |
<ItemGroup> | |
<Content Include="main.js.map"> | |
<DependentUpon>main.ts</DependentUpon> | |
</Content> | |
</ItemGroup> | |
<Target Name="BeforeBuild"> | |
<Message Text="Compiling TypeScript files" /> | |
<Message Text="Executing tsc$(TypeScriptSourceMap) @(TypeScriptCompile ->'"%(fullpath)"', ' ')" /> | |
<Exec Command="tsc$(TypeScriptSourceMap) @(TypeScriptCompile ->'"%(fullpath)"', ' ')" /> | |
</Target> | |
</Project> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| |
Microsoft Visual Studio Solution File, Format Version 12.00 | |
# Visual Studio 2012 Ultimate | |
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WSHSample", "WSHSample\WSHSample.csproj", "{1A09617A-1E3A-4420-BAA9-C117C5FEFBE4}" | |
EndProject | |
Global | |
GlobalSection(SolutionConfigurationPlatforms) = preSolution | |
Debug|Any CPU = Debug|Any CPU | |
Release|Any CPU = Release|Any CPU | |
EndGlobalSection | |
GlobalSection(ProjectConfigurationPlatforms) = postSolution | |
{1A09617A-1E3A-4420-BAA9-C117C5FEFBE4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | |
{1A09617A-1E3A-4420-BAA9-C117C5FEFBE4}.Debug|Any CPU.Build.0 = Debug|Any CPU | |
{1A09617A-1E3A-4420-BAA9-C117C5FEFBE4}.Release|Any CPU.ActiveCfg = Release|Any CPU | |
{1A09617A-1E3A-4420-BAA9-C117C5FEFBE4}.Release|Any CPU.Build.0 = Release|Any CPU | |
EndGlobalSection | |
GlobalSection(SolutionProperties) = preSolution | |
HideSolutionNode = FALSE | |
EndGlobalSection | |
EndGlobal |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment