Merge pull request #3789 from cartermp/fs-update

Update F# dotnet-new templates for Preview 2 (Enrico Sada rebase)
This commit is contained in:
Eric Erhardt 2016-07-12 13:45:43 -05:00 committed by GitHub
commit fc73287c53
8 changed files with 39 additions and 33 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

@ -5,5 +5,4 @@ open System
[<EntryPoint>]
let main argv =
printfn "Hello World!"
printfn "%A" argv
0 // return an integer exit code

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.0"
}
},
"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

@ -97,7 +97,7 @@ namespace Microsoft.DotNet.Tools.New
app.HelpOption("-h|--help");
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" } };
var languages = new[] { csharp, fsharp };

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/**"
]
}