Skip to content
This repository was archived by the owner on Apr 20, 2023. It is now read-only.

Commit 0c10baa

Browse files
cartermpSridhar-MS
authored andcommitted
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.
1 parent 01caa0f commit 0c10baa

File tree

7 files changed

+39
-31
lines changed

7 files changed

+39
-31
lines changed

src/dotnet/commands/dotnet-new/FSharp_Console/NuGet.Config

Lines changed: 0 additions & 12 deletions
This file was deleted.
Lines changed: 5 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"version": "1.0.0-*",
33
"buildOptions": {
4+
"debugType": "portable",
45
"emitEntryPoint": true,
56
"compilerName": "fsc",
67
"compile": {
@@ -9,31 +10,18 @@
910
]
1011
}
1112
},
12-
"dependencies": {
13-
"Microsoft.FSharp.Core.netcore": "1.0.0-alpha-160509"
14-
},
1513
"tools": {
16-
"dotnet-compile-fsc": {
17-
"version": "1.0.0-preview2-*",
18-
"imports": [
19-
"dnxcore50",
20-
"portable-net45+win81",
21-
"netstandard1.3"
22-
]
23-
}
14+
"dotnet-compile-fsc":"1.0.0-preview2-*"
2415
},
2516
"frameworks": {
2617
"netcoreapp1.0": {
2718
"dependencies": {
2819
"Microsoft.NETCore.App": {
2920
"type": "platform",
3021
"version": "1.0.1"
31-
}
32-
},
33-
"imports": [
34-
"portable-net45+win8",
35-
"dnxcore50"
36-
]
22+
},
23+
"Microsoft.FSharp.Core.netcore": "1.0.0-alpha-160629"
24+
}
3725
}
3826
}
3927
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
namespace Library
2+
3+
module Say =
4+
let hello name =
5+
printfn "Hello %s" name
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
"version": "1.0.0-*",
3+
"buildOptions": {
4+
"debugType": "portable"
5+
"compilerName": "fsc",
6+
"compile": {
7+
"includeFiles": [
8+
"Library.fs"
9+
]
10+
}
11+
},
12+
"tools": {
13+
"dotnet-compile-fsc":"1.0.0-preview2-*"
14+
},
15+
"frameworks": {
16+
"netstandard1.6": {
17+
"dependencies": {
18+
"NETStandard.Library":"1.6.0",
19+
"Microsoft.FSharp.Core.netcore": "1.0.0-alpha-160629"
20+
}
21+
}
22+
}
23+
}

src/dotnet/commands/dotnet-new/Program.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ public static int Run(string[] args)
104104
{
105105

106106
var csharp = new { Name = "C#", Alias = new[] { "c#", "cs", "csharp" }, TemplatePrefix = "CSharp", Templates = new[] { "Console", "Web", "Lib", "xunittest" } };
107-
var fsharp = new { Name = "F#", Alias = new[] { "f#", "fs", "fsharp" }, TemplatePrefix = "FSharp", Templates = new[] { "Console" } };
107+
var fsharp = new { Name = "F#", Alias = new[] { "f#", "fs", "fsharp" }, TemplatePrefix = "FSharp", Templates = new[] { "Console", "Lib" } };
108108

109109
string languageValue = lang.Value() ?? csharp.Name;
110110

@@ -152,3 +152,4 @@ public static int Run(string[] args)
152152
}
153153
}
154154
}
155+

src/dotnet/commands/dotnet-new/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ Type of the project. Valid values for C# are:
3636
Valid values for F# are:
3737

3838
* `console`
39+
* `lib`
3940

4041
## EXAMPLES
4142

src/dotnet/project.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,9 @@
77
"commands/dotnet-new/CSharp_Console.zip",
88
"commands/dotnet-new/CSharp_Lib.zip",
99
"commands/dotnet-new/CSharp_xunittest.zip",
10+
"commands/dotnet-new/CSharp_Web.zip",
1011
"commands/dotnet-new/FSharp_Console.zip",
11-
"commands/dotnet-new/CSharp_Web.zip"
12+
"commands/dotnet-new/FSharp_Lib.zip"
1213
]
1314
},
1415
"compile": {
@@ -17,6 +18,7 @@
1718
"commands/dotnet-new/FSharp_Console/**",
1819
"commands/dotnet-new/CSharp_Web/**",
1920
"commands/dotnet-new/CSharp_Lib/**",
21+
"commands/dotnet-new/FSharp_Lib/**",
2022
"commands/dotnet-new/CSharp_xunittest/**"
2123
]
2224
}

0 commit comments

Comments
 (0)