-
-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
New project specific templates (#283)
* libProj init * libProj init * ProjLib tests * ProjTest support * ProjConsole support * Adds docs for proj* * fail on focused * Updating library tutorial * fixing documentation links not generating correctly * Cleanup test suite * fix typos
- Loading branch information
1 parent
696fac6
commit 65dc0d7
Showing
37 changed files
with
550 additions
and
106 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
// Auto-Generated by FAKE; do not edit | ||
namespace System | ||
open System.Reflection | ||
|
||
[<assembly: AssemblyTitleAttribute("MyLib.1")>] | ||
[<assembly: AssemblyProductAttribute("MyLib.1")>] | ||
[<assembly: AssemblyVersionAttribute("0.1.0")>] | ||
[<assembly: AssemblyMetadataAttribute("ReleaseDate","2017-03-17T00:00:00.0000000")>] | ||
[<assembly: AssemblyFileVersionAttribute("0.1.0")>] | ||
[<assembly: AssemblyInformationalVersionAttribute("0.1.0")>] | ||
[<assembly: AssemblyMetadataAttribute("ReleaseChannel","release")>] | ||
[<assembly: AssemblyMetadataAttribute("GitHash","b385af579477bb585016a6b5204121de4a485dac")>] | ||
do () | ||
|
||
module internal AssemblyVersionInformation = | ||
let [<Literal>] AssemblyTitle = "MyLib.1" | ||
let [<Literal>] AssemblyProduct = "MyLib.1" | ||
let [<Literal>] AssemblyVersion = "0.1.0" | ||
let [<Literal>] AssemblyMetadata_ReleaseDate = "2017-03-17T00:00:00.0000000" | ||
let [<Literal>] AssemblyFileVersion = "0.1.0" | ||
let [<Literal>] AssemblyInformationalVersion = "0.1.0" | ||
let [<Literal>] AssemblyMetadata_ReleaseChannel = "release" | ||
let [<Literal>] AssemblyMetadata_GitHash = "b385af579477bb585016a6b5204121de4a485dac" |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<OutputType>Exe</OutputType> | ||
<TargetFramework>net6.0</TargetFramework> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<Compile Include="AssemblyInfo.fs" /> | ||
<Compile Include="Program.fs" /> | ||
</ItemGroup> | ||
<Import Project="..\..\.paket\Paket.Restore.targets" /> | ||
|
||
</Project> |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
// For more information see https://aka.ms/fsharp-console-apps | ||
printfn "Hello from F#" |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
FSharp.Core | ||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
// Auto-Generated by FAKE; do not edit | ||
namespace System | ||
open System.Reflection | ||
|
||
[<assembly: AssemblyTitleAttribute("MyLib.1")>] | ||
[<assembly: AssemblyProductAttribute("MyLib.1")>] | ||
[<assembly: AssemblyVersionAttribute("0.1.0")>] | ||
[<assembly: AssemblyMetadataAttribute("ReleaseDate","2017-03-17T00:00:00.0000000")>] | ||
[<assembly: AssemblyFileVersionAttribute("0.1.0")>] | ||
[<assembly: AssemblyInformationalVersionAttribute("0.1.0")>] | ||
[<assembly: AssemblyMetadataAttribute("ReleaseChannel","release")>] | ||
[<assembly: AssemblyMetadataAttribute("GitHash","bb8964b54bee133e9af64d316dc2cfee16df7f72")>] | ||
do () | ||
|
||
module internal AssemblyVersionInformation = | ||
let [<Literal>] AssemblyTitle = "MyLib.1" | ||
let [<Literal>] AssemblyProduct = "MyLib.1" | ||
let [<Literal>] AssemblyVersion = "0.1.0" | ||
let [<Literal>] AssemblyMetadata_ReleaseDate = "2017-03-17T00:00:00.0000000" | ||
let [<Literal>] AssemblyFileVersion = "0.1.0" | ||
let [<Literal>] AssemblyInformationalVersion = "0.1.0" | ||
let [<Literal>] AssemblyMetadata_ReleaseChannel = "release" | ||
let [<Literal>] AssemblyMetadata_GitHash = "bb8964b54bee133e9af64d316dc2cfee16df7f72" |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
namespace MyLib._1 | ||
|
||
open System | ||
open System.Security.Cryptography | ||
open System.Text | ||
|
||
/// <summary> Initial module </summary> | ||
module Say = | ||
|
||
/// <summary> Finite list of Colors </summary> | ||
type FavoriteColor = | ||
| Red | ||
| Yellow | ||
| Blue | ||
|
||
/// <summary> A person with many different field types </summary> | ||
type Person = { | ||
Name: string | ||
FavoriteNumber: int | ||
FavoriteColor: FavoriteColor | ||
DateOfBirth: DateTimeOffset | ||
} | ||
|
||
/// <summary>Says hello to a specific person</summary> | ||
let helloPerson (person: Person) = | ||
sprintf | ||
"Hello %s. You were born on %s and your favorite number is %d. You like %A." | ||
person.Name | ||
(person.DateOfBirth.ToString("yyyy/MM/dd", Globalization.CultureInfo.InvariantCulture)) | ||
person.FavoriteNumber | ||
person.FavoriteColor | ||
|
||
/// <summary> | ||
/// Adds two integers <paramref name="a"/> and <paramref name="b"/> and returns the result. | ||
/// </summary> | ||
/// | ||
/// <remarks> | ||
/// This usually contains some really important information that you'll miss if you don't read the docs. | ||
/// </remarks> | ||
/// | ||
/// <param name="a">An integer.</param> | ||
/// <param name="b">An integer.</param> | ||
/// | ||
/// <returns> | ||
/// The sum of two integers. | ||
/// </returns> | ||
/// | ||
/// <exceptions cref="M:System.OverflowException">Thrown when one parameter is max | ||
/// and the other is greater than 0.</exceptions> | ||
let add a b = a + b | ||
|
||
|
||
/// I do nothing | ||
let nothing name = | ||
name | ||
|> ignore |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
<PropertyGroup> | ||
<TargetFramework>net6.0</TargetFramework> | ||
</PropertyGroup> | ||
<PropertyGroup> | ||
<Title>MyLib.1</Title> | ||
<Description>MyLib.1 does the thing!</Description> | ||
|
||
</PropertyGroup> | ||
<PropertyGroup Condition="'$(Configuration)'=='Release'"> | ||
<Optimize>true</Optimize> | ||
<Tailcalls>true</Tailcalls> | ||
|
||
</PropertyGroup> | ||
<ItemGroup> | ||
<Compile Include="AssemblyInfo.fs" /> | ||
<Compile Include="Library.fs" /> | ||
</ItemGroup> | ||
<Import Project="..\..\.paket\Paket.Restore.targets" /> | ||
</Project> | ||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
FSharp.Core | ||
Microsoft.SourceLink.GitHub | ||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
namespace MyLib._1 | ||
|
||
module ExpectoTemplate = | ||
|
||
open Expecto | ||
|
||
[<EntryPoint>] | ||
let main argv = | ||
Tests.runTestsInAssembly defaultConfig argv |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
<PropertyGroup> | ||
<OutputType>Exe</OutputType> | ||
<TargetFramework>net6.0</TargetFramework> | ||
<GenerateProgramFile>false</GenerateProgramFile> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<Compile Include="Tests.fs" /> | ||
<Compile Include="Main.fs" /> | ||
</ItemGroup> | ||
<Import Project="..\..\.paket\Paket.Restore.targets" /> | ||
</Project> | ||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
namespace MyLib._1 | ||
|
||
open System | ||
open Expecto | ||
|
||
|
||
module SayTests = | ||
[<Tests>] | ||
let tests = | ||
testList "samples" [ | ||
testCase "Add two integers" | ||
<| fun _ -> | ||
let result = 2 + 2 | ||
Expect.equal result 4 "Addition works" | ||
] |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
Expecto | ||
FSharp.Core | ||
Microsoft.NET.Test.Sdk | ||
YoloDev.Expecto.TestSdk | ||
altcover |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# only here to stop paket from looking deeper into this folder | ||
# https://github.com/fsprojects/Paket/issues/3444 |
This file contains 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
Oops, something went wrong.