Merge pull request #3789 from cartermp/fs-update
Update F# dotnet-new templates for Preview 2 (Enrico Sada rebase)
This commit is contained in:
commit
fc73287c53
8 changed files with 39 additions and 33 deletions
|
@ -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>
|
|
|
@ -5,5 +5,4 @@ open System
|
||||||
[<EntryPoint>]
|
[<EntryPoint>]
|
||||||
let main argv =
|
let main argv =
|
||||||
printfn "Hello World!"
|
printfn "Hello World!"
|
||||||
printfn "%A" argv
|
|
||||||
0 // return an integer exit code
|
0 // return an integer exit code
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
{
|
{
|
||||||
"version": "1.0.0-*",
|
"version": "1.0.0-*",
|
||||||
"buildOptions": {
|
"buildOptions": {
|
||||||
|
"debugType": "portable",
|
||||||
"emitEntryPoint": true,
|
"emitEntryPoint": true,
|
||||||
"compilerName": "fsc",
|
"compilerName": "fsc",
|
||||||
"compile": {
|
"compile": {
|
||||||
|
@ -9,18 +10,8 @@
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"dependencies": {
|
|
||||||
"Microsoft.FSharp.Core.netcore": "1.0.0-alpha-160509"
|
|
||||||
},
|
|
||||||
"tools": {
|
"tools": {
|
||||||
"dotnet-compile-fsc": {
|
"dotnet-compile-fsc":"1.0.0-preview2-*"
|
||||||
"version": "1.0.0-preview2-*",
|
|
||||||
"imports": [
|
|
||||||
"dnxcore50",
|
|
||||||
"portable-net45+win81",
|
|
||||||
"netstandard1.3"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
"frameworks": {
|
"frameworks": {
|
||||||
"netcoreapp1.0": {
|
"netcoreapp1.0": {
|
||||||
|
@ -28,12 +19,9 @@
|
||||||
"Microsoft.NETCore.App": {
|
"Microsoft.NETCore.App": {
|
||||||
"type": "platform",
|
"type": "platform",
|
||||||
"version": "1.0.0"
|
"version": "1.0.0"
|
||||||
}
|
},
|
||||||
},
|
"Microsoft.FSharp.Core.netcore": "1.0.0-alpha-160629"
|
||||||
"imports": [
|
}
|
||||||
"portable-net45+win8",
|
|
||||||
"dnxcore50"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
5
src/dotnet/commands/dotnet-new/FSharp_Lib/Library.fs
Normal file
5
src/dotnet/commands/dotnet-new/FSharp_Lib/Library.fs
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
namespace Library
|
||||||
|
|
||||||
|
module Say =
|
||||||
|
let hello name =
|
||||||
|
printfn "Hello %s" name
|
|
@ -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"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -97,7 +97,7 @@ namespace Microsoft.DotNet.Tools.New
|
||||||
app.HelpOption("-h|--help");
|
app.HelpOption("-h|--help");
|
||||||
|
|
||||||
var csharp = new { Name = "C#", Alias = new[] { "c#", "cs", "csharp" }, TemplatePrefix = "CSharp", Templates = new[] { "Console", "Web", "Lib", "xunittest" } };
|
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 };
|
var languages = new[] { csharp, fsharp };
|
||||||
|
|
||||||
|
|
|
@ -36,6 +36,7 @@ Type of the project. Valid values for C# are:
|
||||||
Valid values for F# are:
|
Valid values for F# are:
|
||||||
|
|
||||||
* `console`
|
* `console`
|
||||||
|
* `lib`
|
||||||
|
|
||||||
## EXAMPLES
|
## EXAMPLES
|
||||||
|
|
||||||
|
|
|
@ -7,8 +7,9 @@
|
||||||
"commands/dotnet-new/CSharp_Console.zip",
|
"commands/dotnet-new/CSharp_Console.zip",
|
||||||
"commands/dotnet-new/CSharp_Lib.zip",
|
"commands/dotnet-new/CSharp_Lib.zip",
|
||||||
"commands/dotnet-new/CSharp_xunittest.zip",
|
"commands/dotnet-new/CSharp_xunittest.zip",
|
||||||
|
"commands/dotnet-new/CSharp_Web.zip",
|
||||||
"commands/dotnet-new/FSharp_Console.zip",
|
"commands/dotnet-new/FSharp_Console.zip",
|
||||||
"commands/dotnet-new/CSharp_Web.zip"
|
"commands/dotnet-new/FSharp_Lib.zip"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"compile": {
|
"compile": {
|
||||||
|
@ -17,6 +18,7 @@
|
||||||
"commands/dotnet-new/FSharp_Console/**",
|
"commands/dotnet-new/FSharp_Console/**",
|
||||||
"commands/dotnet-new/CSharp_Web/**",
|
"commands/dotnet-new/CSharp_Web/**",
|
||||||
"commands/dotnet-new/CSharp_Lib/**",
|
"commands/dotnet-new/CSharp_Lib/**",
|
||||||
|
"commands/dotnet-new/FSharp_Lib/**",
|
||||||
"commands/dotnet-new/CSharp_xunittest/**"
|
"commands/dotnet-new/CSharp_xunittest/**"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue