Update F# dotnet-new templates for Preview 2 (Enrico Sada rebase)

This updates the F# templates for dotnet-new to be compatible with Preview 2.
This commit is contained in:
cartermp 2016-07-05 21:38:12 -07:00 committed by Sridhar Periyasamy
parent 01caa0fb4f
commit 0c10baa40d
7 changed files with 39 additions and 31 deletions

View file

@ -1,12 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<!--To inherit the global NuGet package sources remove the <clear/> line below -->
<clear />
<add key="api.nuget.org" value="https://api.nuget.org/v3/index.json" />
<add key="fsharp-daily" value="https://www.myget.org/F/fsharp-daily/api/v3/index.json" />
<!-- Location of dotnet-compile-fsc tool -->
<add key="dotnet-cli" value="https://dotnet.myget.org/F/dotnet-cli/api/v3/index.json" />
</packageSources>
</configuration>

View file

@ -1,6 +1,7 @@
{
"version": "1.0.0-*",
"buildOptions": {
"debugType": "portable",
"emitEntryPoint": true,
"compilerName": "fsc",
"compile": {
@ -9,18 +10,8 @@
]
}
},
"dependencies": {
"Microsoft.FSharp.Core.netcore": "1.0.0-alpha-160509"
},
"tools": {
"dotnet-compile-fsc": {
"version": "1.0.0-preview2-*",
"imports": [
"dnxcore50",
"portable-net45+win81",
"netstandard1.3"
]
}
"dotnet-compile-fsc":"1.0.0-preview2-*"
},
"frameworks": {
"netcoreapp1.0": {
@ -28,12 +19,9 @@
"Microsoft.NETCore.App": {
"type": "platform",
"version": "1.0.1"
}
},
"imports": [
"portable-net45+win8",
"dnxcore50"
]
},
"Microsoft.FSharp.Core.netcore": "1.0.0-alpha-160629"
}
}
}
}

View file

@ -0,0 +1,5 @@
namespace Library
module Say =
let hello name =
printfn "Hello %s" name

View file

@ -0,0 +1,23 @@
{
"version": "1.0.0-*",
"buildOptions": {
"debugType": "portable"
"compilerName": "fsc",
"compile": {
"includeFiles": [
"Library.fs"
]
}
},
"tools": {
"dotnet-compile-fsc":"1.0.0-preview2-*"
},
"frameworks": {
"netstandard1.6": {
"dependencies": {
"NETStandard.Library":"1.6.0",
"Microsoft.FSharp.Core.netcore": "1.0.0-alpha-160629"
}
}
}
}

View file

@ -104,7 +104,7 @@ namespace Microsoft.DotNet.Tools.New
{
var csharp = new { Name = "C#", Alias = new[] { "c#", "cs", "csharp" }, TemplatePrefix = "CSharp", Templates = new[] { "Console", "Web", "Lib", "xunittest" } };
var fsharp = new { Name = "F#", Alias = new[] { "f#", "fs", "fsharp" }, TemplatePrefix = "FSharp", Templates = new[] { "Console" } };
var fsharp = new { Name = "F#", Alias = new[] { "f#", "fs", "fsharp" }, TemplatePrefix = "FSharp", Templates = new[] { "Console", "Lib" } };
string languageValue = lang.Value() ?? csharp.Name;
@ -152,3 +152,4 @@ namespace Microsoft.DotNet.Tools.New
}
}
}

View file

@ -36,6 +36,7 @@ Type of the project. Valid values for C# are:
Valid values for F# are:
* `console`
* `lib`
## EXAMPLES

View file

@ -7,8 +7,9 @@
"commands/dotnet-new/CSharp_Console.zip",
"commands/dotnet-new/CSharp_Lib.zip",
"commands/dotnet-new/CSharp_xunittest.zip",
"commands/dotnet-new/CSharp_Web.zip",
"commands/dotnet-new/FSharp_Console.zip",
"commands/dotnet-new/CSharp_Web.zip"
"commands/dotnet-new/FSharp_Lib.zip"
]
},
"compile": {
@ -17,6 +18,7 @@
"commands/dotnet-new/FSharp_Console/**",
"commands/dotnet-new/CSharp_Web/**",
"commands/dotnet-new/CSharp_Lib/**",
"commands/dotnet-new/FSharp_Lib/**",
"commands/dotnet-new/CSharp_xunittest/**"
]
}