Skip to content

Commit 175b56d

Browse files
committed
Initial commit
This seems to be the bare minimum to get a project started
0 parents  commit 175b56d

12 files changed

+370
-0
lines changed

._fake/.paket/paket.bootstrapper.exe

28 KB
Binary file not shown.

._fake/config.fsx

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
namespace FSharpUtils.Fake.Config
2+
3+
#r @"./packages/FAKE/tools/FakeLib.dll"
4+
5+
open Fake
6+
open Fake.EnvironmentHelper
7+
open System.IO
8+
9+
module Common =
10+
let RootDir = Directory.GetCurrentDirectory()
11+
12+
module Source =
13+
open Common
14+
15+
let SolutionFile = !! (Path.Combine(RootDir, "*.sln"))
16+
17+
module Build =
18+
let TestAssemblies = !! "tests/**/*.Tests.dll" -- "**/obj/**/*.Tests.dll"
19+
let DotNetVersion = "4.5"
20+
let MSBuildArtifacts = !! "src/**/bin/**/*.*" ++ "src/**/obj/**/*.*"
21+
22+
module Nuget =
23+
let ApiEnvVar = "NUGET_API_KEY"
24+
let ApiKey = environVar ApiEnvVar
25+
let PackageDirName = "nupkgs"
26+
27+
module Release =
28+
let Items = !! "**/bin/Release/*"
29+
let Version = "0.0.1"
30+
let Project = "FSharp.FakeTargets"
31+
let Nuspec = Project + ".nuspec"
32+
let Authors = [ ]
33+
let Description = "TODO: Add a description"
34+
let OutputPath = Nuget.PackageDirName
35+
let WorkingDir = "bin"

._fake/loader.fsx

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
#load @"./config.fsx"

._fake/paket.bat

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
@echo off
2+
3+
set paket_args=%*
4+
5+
IF NOT EXIST ".paket\paket.exe" (
6+
".\.paket\paket.bootstrapper.exe"
7+
)
8+
9+
".paket\paket.exe" %paket_args%

._fake/paket.dependencies

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
source https://nuget.org/api/v2
2+
3+
nuget FAKE
4+
nuget FSharp.FakeTargets
5+
nuget NUnit.Runners 2.6.4

.gitignore

+236
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,236 @@
1+
## Ignore Visual Studio temporary files, build results, and
2+
## files generated by popular Visual Studio add-ons.
3+
4+
# User-specific files
5+
*.suo
6+
*.user
7+
*.userosscache
8+
*.sln.docstates
9+
10+
# User-specific files (MonoDevelop/Xamarin Studio)
11+
*.userprefs
12+
13+
# Build results
14+
[Dd]ebug/
15+
[Dd]ebugPublic/
16+
[Rr]elease/
17+
[Rr]eleases/
18+
x64/
19+
x86/
20+
bld/
21+
[Bb]in/
22+
[Oo]bj/
23+
24+
# Visual Studio 2015 cache/options directory
25+
.vs/
26+
# Uncomment if you have tasks that create the project's static files in wwwroot
27+
#wwwroot/
28+
29+
# MSTest test Results
30+
[Tt]est[Rr]esult*/
31+
[Bb]uild[Ll]og.*
32+
33+
# NUNIT
34+
*.VisualState.xml
35+
TestResult.xml
36+
37+
# Build Results of an ATL Project
38+
[Dd]ebugPS/
39+
[Rr]eleasePS/
40+
dlldata.c
41+
42+
# DNX
43+
project.lock.json
44+
artifacts/
45+
46+
*_i.c
47+
*_p.c
48+
*_i.h
49+
*.ilk
50+
*.meta
51+
*.obj
52+
*.pch
53+
*.pdb
54+
*.pgc
55+
*.pgd
56+
*.rsp
57+
*.sbr
58+
*.tlb
59+
*.tli
60+
*.tlh
61+
*.tmp
62+
*.tmp_proj
63+
*.log
64+
*.vspscc
65+
*.vssscc
66+
.builds
67+
*.pidb
68+
*.svclog
69+
*.scc
70+
71+
# Chutzpah Test files
72+
_Chutzpah*
73+
74+
# Visual C++ cache files
75+
ipch/
76+
*.aps
77+
*.ncb
78+
*.opendb
79+
*.opensdf
80+
*.sdf
81+
*.cachefile
82+
83+
# Visual Studio profiler
84+
*.psess
85+
*.vsp
86+
*.vspx
87+
*.sap
88+
89+
# TFS 2012 Local Workspace
90+
$tf/
91+
92+
# Guidance Automation Toolkit
93+
*.gpState
94+
95+
# ReSharper is a .NET coding add-in
96+
_ReSharper*/
97+
*.[Rr]e[Ss]harper
98+
*.DotSettings.user
99+
100+
# JustCode is a .NET coding add-in
101+
.JustCode
102+
103+
# TeamCity is a build add-in
104+
_TeamCity*
105+
106+
# DotCover is a Code Coverage Tool
107+
*.dotCover
108+
109+
# NCrunch
110+
_NCrunch_*
111+
.*crunch*.local.xml
112+
nCrunchTemp_*
113+
114+
# MightyMoose
115+
*.mm.*
116+
AutoTest.Net/
117+
118+
# Web workbench (sass)
119+
.sass-cache/
120+
121+
# Installshield output folder
122+
[Ee]xpress/
123+
124+
# DocProject is a documentation generator add-in
125+
DocProject/buildhelp/
126+
DocProject/Help/*.HxT
127+
DocProject/Help/*.HxC
128+
DocProject/Help/*.hhc
129+
DocProject/Help/*.hhk
130+
DocProject/Help/*.hhp
131+
DocProject/Help/Html2
132+
DocProject/Help/html
133+
134+
# Click-Once directory
135+
publish/
136+
137+
# Publish Web Output
138+
*.[Pp]ublish.xml
139+
*.azurePubxml
140+
# TODO: Comment the next line if you want to checkin your web deploy settings
141+
# but database connection strings (with potential passwords) will be unencrypted
142+
*.pubxml
143+
*.publishproj
144+
145+
# NuGet Packages
146+
*.nupkg
147+
# The packages folder can be ignored because of Package Restore
148+
**/packages/*
149+
# except build/, which is used as an MSBuild target.
150+
!**/packages/build/
151+
# Uncomment if necessary however generally it will be regenerated when needed
152+
#!**/packages/repositories.config
153+
# NuGet v3's project.json files produces more ignoreable files
154+
*.nuget.props
155+
*.nuget.targets
156+
157+
# Microsoft Azure Build Output
158+
csx/
159+
*.build.csdef
160+
161+
# Microsoft Azure Emulator
162+
ecf/
163+
rcf/
164+
165+
# Microsoft Azure ApplicationInsights config file
166+
ApplicationInsights.config
167+
168+
# Windows Store app package directory
169+
AppPackages/
170+
BundleArtifacts/
171+
172+
# Visual Studio cache files
173+
# files ending in .cache can be ignored
174+
*.[Cc]ache
175+
# but keep track of directories ending in .cache
176+
!*.[Cc]ache/
177+
178+
# Others
179+
ClientBin/
180+
~$*
181+
*~
182+
*.dbmdl
183+
*.dbproj.schemaview
184+
*.pfx
185+
*.publishsettings
186+
node_modules/
187+
orleans.codegen.cs
188+
189+
# RIA/Silverlight projects
190+
Generated_Code/
191+
192+
# Backup & report files from converting an old project file
193+
# to a newer Visual Studio version. Backup files are not needed,
194+
# because we have git ;-)
195+
_UpgradeReport_Files/
196+
Backup*/
197+
UpgradeLog*.XML
198+
UpgradeLog*.htm
199+
200+
# SQL Server files
201+
*.mdf
202+
*.ldf
203+
204+
# Business Intelligence projects
205+
*.rdl.data
206+
*.bim.layout
207+
*.bim_*.settings
208+
209+
# Microsoft Fakes
210+
FakesAssemblies/
211+
212+
# GhostDoc plugin setting file
213+
*.GhostDoc.xml
214+
215+
# Node.js Tools for Visual Studio
216+
.ntvs_analysis.dat
217+
218+
# Visual Studio 6 build log
219+
*.plg
220+
221+
# Visual Studio 6 workspace options file
222+
*.opt
223+
224+
# Visual Studio LightSwitch build output
225+
**/*.HTMLClient/GeneratedArtifacts
226+
**/*.DesktopClient/GeneratedArtifacts
227+
**/*.DesktopClient/ModelManifest.xml
228+
**/*.Server/GeneratedArtifacts
229+
**/*.Server/ModelManifest.xml
230+
_Pvt_Extensions
231+
232+
# Paket dependency manager
233+
._fake/.paket/paket.exe
234+
235+
# FAKE - F# Make
236+
.fake/

LICENSE

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
The MIT License (MIT)
2+
3+
Copyright (c) 2016 datNET
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# fs-project-template

build.fsx

+53
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
#r @"./._fake/packages/FAKE/tools/FakeLib.dll"
2+
#r @"./._fake/packages/FSharp.FakeTargets/tools/FSharpFakeTargets.dll"
3+
4+
#load @"./._fake/loader.fsx"
5+
6+
open Fake
7+
open NuGetHelper
8+
open RestorePackageHelper
9+
open FSharpUtils.Fake.Config
10+
11+
DatNET.Targets.Initialize id
12+
13+
Target "RestorePackages" (fun _ ->
14+
Source.SolutionFile
15+
|> Seq.head
16+
|> RestoreMSSolutionPackages (fun p ->
17+
{ p with
18+
Sources = [ "https://nuget.org/api/v2"; ]
19+
OutputPath = "packages"
20+
Retries = 4 })
21+
)
22+
23+
Target "Test" (fun _ ->
24+
let setParams = (fun p ->
25+
{ p with DisableShadowCopy = true; ErrorLevel = DontFailBuild; Framework = Build.DotNetVersion; })
26+
27+
Build.TestAssemblies |> NUnit setParams
28+
)
29+
30+
Target "CreateNugetPackageDirPath" (fun _ ->
31+
CreateDir Nuget.PackageDirName
32+
)
33+
34+
Target "PackageAndPublish" (fun _ ->
35+
Release.Nuspec
36+
|> NuGet (fun p ->
37+
{ p with
38+
Version = Release.Version
39+
Project = Release.Project
40+
Authors = Release.Authors
41+
Description = Release.Description
42+
OutputPath = Release.OutputPath
43+
WorkingDir = Release.WorkingDir
44+
Publish = true
45+
AccessKey = Nuget.ApiKey
46+
})
47+
)
48+
49+
"MSBuild" <== [ "Clean"; "RestorePackages" ]
50+
"Test" <== [ "MSBuild" ]
51+
"PackageAndPublish" <== [ "MSBuild"; "CreateNugetPackageDirPath" ]
52+
53+
RunTargetOrDefault "MSBuild"

fake.bat

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
@echo off
2+
3+
set fake_args=%*
4+
5+
cd "._fake"
6+
call "paket.bat" "restore"
7+
cd ".."
8+
9+
"._fake\packages\FAKE\tools\FAKE.exe" "build.fsx" %fake_args%

src/.gitignore

Whitespace-only changes.

tests/.gitignore

Whitespace-only changes.

0 commit comments

Comments
 (0)