Skip to content

Commit

Permalink
Getting project structure up part 2
Browse files Browse the repository at this point in the history
  • Loading branch information
Tomas Jansson committed Jul 28, 2018
1 parent 023819e commit 9695b23
Show file tree
Hide file tree
Showing 10 changed files with 656 additions and 14 deletions.
299 changes: 299 additions & 0 deletions .paket/Paket.Restore.targets

Large diffs are not rendered by default.

Binary file added .paket/paket.exe
Binary file not shown.
25 changes: 25 additions & 0 deletions build.fsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#load ".fake/build.fsx/intellisense.fsx"
open Fake.Core
open Fake.DotNet
open Fake.IO
open Fake.IO.Globbing.Operators
open Fake.Core.TargetOperators

Target.create "Clean" (fun _ ->
!! "src/**/bin"
++ "src/**/obj"
|> Shell.cleanDirs
)

Target.create "Build" (fun _ ->
!! "src/**/*.*proj"
|> Seq.iter (DotNet.build id)
)

Target.create "All" ignore

"Clean"
==> "Build"
==> "All"

Target.runOrDefault "All"
7 changes: 7 additions & 0 deletions fake.cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
SET TOOL_PATH=.fake

IF NOT EXIST "%TOOL_PATH%\fake.exe" (
dotnet tool install fake-cli --tool-path ./%TOOL_PATH% --version 5.*
)

"%TOOL_PATH%/fake.exe" %*
27 changes: 27 additions & 0 deletions fake.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#!/usr/bin/env bash

set -eu
set -o pipefail

# liberated from https://stackoverflow.com/a/18443300/433393
realpath() {
OURPWD=$PWD
cd "$(dirname "$1")"
LINK=$(readlink "$(basename "$1")")
while [ "$LINK" ]; do
cd "$(dirname "$LINK")"
LINK=$(readlink "$(basename "$1")")
done
REALPATH="$PWD/$(basename "$1")"
cd "$OURPWD"
echo "$REALPATH"
}

TOOL_PATH=$(realpath .fake)
FAKE="$TOOL_PATH"/fake

if ! [ -e "$FAKE" ]
then
dotnet tool install fake-cli --tool-path $TOOL_PATH --version 5.*
fi
"$FAKE" "$@"
18 changes: 18 additions & 0 deletions paket.dependencies
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
source https://www.nuget.org/api/v2
storage:none
framework: netstandard2.0

nuget FSharp.Core redirects:force
nuget Fable.Core
nuget Fable.Import.Express


// [ FAKE GROUP ]
group Build
source https://api.nuget.org/v3/index.json

framework: netstandard2.0

nuget Fake.DotNet.Cli
nuget Fake.IO.FileSystem
nuget Fake.Core.Target
264 changes: 264 additions & 0 deletions paket.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,264 @@
STORAGE: NONE
RESTRICTION: == netstandard2.0
NUGET
remote: https://www.nuget.org/api/v2
Fable.Core (1.3.17)
FSharp.Core (>= 4.2.3)
NETStandard.Library (>= 1.6.1)
Fable.Import.Express (0.1)
Fable.Import.Node (>= 0.1)
NETStandard.Library (>= 1.6.1)
Fable.Import.Node (0.4.3)
Fable.Core (>= 1.3.8)
FSharp.Core (4.5.2) - redirects: force
Microsoft.NETCore.Platforms (2.1)
NETStandard.Library (2.0.3)
Microsoft.NETCore.Platforms (>= 1.1)

GROUP Build
RESTRICTION: == netstandard2.0
NUGET
remote: https://api.nuget.org/v3/index.json
Fake.Core.CommandLineParsing (5.2)
FParsec (>= 1.0.3)
FSharp.Core (>= 4.3.4)
Fake.Core.Context (5.2)
FSharp.Core (>= 4.3.4)
Fake.Core.Environment (5.2)
FSharp.Core (>= 4.3.4)
Fake.Core.FakeVar (5.2)
Fake.Core.Context (>= 5.2)
FSharp.Core (>= 4.3.4)
Fake.Core.Process (5.2)
Fake.Core.Environment (>= 5.2)
Fake.Core.FakeVar (>= 5.2)
Fake.Core.String (>= 5.2)
Fake.Core.Trace (>= 5.2)
Fake.IO.FileSystem (>= 5.2)
FSharp.Core (>= 4.3.4)
System.Diagnostics.Process (>= 4.3)
Fake.Core.String (5.2)
FSharp.Core (>= 4.3.4)
Fake.Core.Target (5.2)
Fake.Core.CommandLineParsing (>= 5.2)
Fake.Core.Context (>= 5.2)
Fake.Core.Environment (>= 5.2)
Fake.Core.FakeVar (>= 5.2)
Fake.Core.Process (>= 5.2)
Fake.Core.String (>= 5.2)
Fake.Core.Trace (>= 5.2)
FSharp.Control.Reactive (>= 4.1)
FSharp.Core (>= 4.3.4)
System.Reactive.Compatibility (>= 4.0)
Fake.Core.Trace (5.2)
Fake.Core.Environment (>= 5.2)
Fake.Core.FakeVar (>= 5.2)
FSharp.Core (>= 4.3.4)
Fake.DotNet.Cli (5.2)
Fake.Core.Environment (>= 5.2)
Fake.Core.Process (>= 5.2)
Fake.Core.String (>= 5.2)
Fake.Core.Trace (>= 5.2)
Fake.IO.FileSystem (>= 5.2)
FSharp.Core (>= 4.3.4)
Newtonsoft.Json (>= 11.0.2)
Fake.IO.FileSystem (5.2)
Fake.Core.String (>= 5.2)
FSharp.Core (>= 4.3.4)
System.Diagnostics.FileVersionInfo (>= 4.3)
System.IO.FileSystem.Watcher (>= 4.3)
FParsec (1.0.3)
FSharp.Core (>= 4.2.3)
NETStandard.Library (>= 1.6.1)
FSharp.Control.Reactive (4.1)
FSharp.Core (>= 4.2.3)
System.Reactive (>= 4.0)
FSharp.Core (4.5.2)
Microsoft.NETCore.Platforms (2.1)
Microsoft.NETCore.Targets (2.1)
Microsoft.Win32.Primitives (4.3)
Microsoft.NETCore.Platforms (>= 1.1)
Microsoft.NETCore.Targets (>= 1.1)
System.Runtime (>= 4.3)
Microsoft.Win32.Registry (4.5)
System.Buffers (>= 4.4)
System.Memory (>= 4.5)
System.Security.AccessControl (>= 4.5)
System.Security.Principal.Windows (>= 4.5)
NETStandard.Library (2.0.3)
Microsoft.NETCore.Platforms (>= 1.1)
Newtonsoft.Json (11.0.2)
runtime.native.System (4.3.1)
Microsoft.NETCore.Platforms (>= 1.1.1)
Microsoft.NETCore.Targets (>= 1.1.3)
System.Buffers (4.5)
System.Collections (4.3)
Microsoft.NETCore.Platforms (>= 1.1)
Microsoft.NETCore.Targets (>= 1.1)
System.Runtime (>= 4.3)
System.Collections.Immutable (1.5)
System.Diagnostics.Debug (4.3)
Microsoft.NETCore.Platforms (>= 1.1)
Microsoft.NETCore.Targets (>= 1.1)
System.Runtime (>= 4.3)
System.Diagnostics.FileVersionInfo (4.3)
Microsoft.NETCore.Platforms (>= 1.1)
System.Globalization (>= 4.3)
System.IO (>= 4.3)
System.IO.FileSystem (>= 4.3)
System.IO.FileSystem.Primitives (>= 4.3)
System.Reflection.Metadata (>= 1.4.1)
System.Runtime (>= 4.3)
System.Runtime.Extensions (>= 4.3)
System.Runtime.InteropServices (>= 4.3)
System.Diagnostics.Process (4.3)
Microsoft.NETCore.Platforms (>= 1.1)
Microsoft.Win32.Primitives (>= 4.3)
Microsoft.Win32.Registry (>= 4.3)
runtime.native.System (>= 4.3)
System.Collections (>= 4.3)
System.Diagnostics.Debug (>= 4.3)
System.Globalization (>= 4.3)
System.IO (>= 4.3)
System.IO.FileSystem (>= 4.3)
System.IO.FileSystem.Primitives (>= 4.3)
System.Resources.ResourceManager (>= 4.3)
System.Runtime (>= 4.3)
System.Runtime.Extensions (>= 4.3)
System.Runtime.Handles (>= 4.3)
System.Runtime.InteropServices (>= 4.3)
System.Text.Encoding (>= 4.3)
System.Text.Encoding.Extensions (>= 4.3)
System.Threading (>= 4.3)
System.Threading.Tasks (>= 4.3)
System.Threading.Thread (>= 4.3)
System.Threading.ThreadPool (>= 4.3)
System.Globalization (4.3)
Microsoft.NETCore.Platforms (>= 1.1)
Microsoft.NETCore.Targets (>= 1.1)
System.Runtime (>= 4.3)
System.IO (4.3)
Microsoft.NETCore.Platforms (>= 1.1)
Microsoft.NETCore.Targets (>= 1.1)
System.Runtime (>= 4.3)
System.Text.Encoding (>= 4.3)
System.Threading.Tasks (>= 4.3)
System.IO.FileSystem (4.3)
Microsoft.NETCore.Platforms (>= 1.1)
Microsoft.NETCore.Targets (>= 1.1)
System.IO (>= 4.3)
System.IO.FileSystem.Primitives (>= 4.3)
System.Runtime (>= 4.3)
System.Runtime.Handles (>= 4.3)
System.Text.Encoding (>= 4.3)
System.Threading.Tasks (>= 4.3)
System.IO.FileSystem.Primitives (4.3)
System.Runtime (>= 4.3)
System.IO.FileSystem.Watcher (4.3)
Microsoft.NETCore.Platforms (>= 1.1)
Microsoft.Win32.Primitives (>= 4.3)
runtime.native.System (>= 4.3)
System.Collections (>= 4.3)
System.IO.FileSystem (>= 4.3)
System.IO.FileSystem.Primitives (>= 4.3)
System.Resources.ResourceManager (>= 4.3)
System.Runtime (>= 4.3)
System.Runtime.Extensions (>= 4.3)
System.Runtime.Handles (>= 4.3)
System.Runtime.InteropServices (>= 4.3)
System.Text.Encoding (>= 4.3)
System.Threading (>= 4.3)
System.Threading.Overlapped (>= 4.3)
System.Threading.Tasks (>= 4.3)
System.Threading.Thread (>= 4.3)
System.Memory (4.5.1)
System.Buffers (>= 4.4)
System.Numerics.Vectors (>= 4.4)
System.Runtime.CompilerServices.Unsafe (>= 4.5)
System.Numerics.Vectors (4.5)
System.Reactive (4.0)
System.Runtime.InteropServices.WindowsRuntime (>= 4.3)
System.Reactive.Compatibility (4.0)
System.Reactive.Core (>= 4.0)
System.Reactive.Interfaces (>= 4.0)
System.Reactive.Linq (>= 4.0)
System.Reactive.PlatformServices (>= 4.0)
System.Reactive.Providers (>= 4.0)
System.Reactive.Core (4.0)
System.Reactive (>= 4.0)
System.Reactive.Interfaces (4.0)
System.Reactive (>= 4.0)
System.Reactive.Linq (4.0)
System.Reactive (>= 4.0)
System.Reactive.PlatformServices (4.0)
System.Reactive (>= 4.0)
System.Reactive.Providers (4.0)
System.Reactive (>= 4.0)
System.Reflection (4.3)
Microsoft.NETCore.Platforms (>= 1.1)
Microsoft.NETCore.Targets (>= 1.1)
System.IO (>= 4.3)
System.Reflection.Primitives (>= 4.3)
System.Runtime (>= 4.3)
System.Reflection.Metadata (1.6)
System.Collections.Immutable (>= 1.5)
System.Reflection.Primitives (4.3)
Microsoft.NETCore.Platforms (>= 1.1)
Microsoft.NETCore.Targets (>= 1.1)
System.Runtime (>= 4.3)
System.Resources.ResourceManager (4.3)
Microsoft.NETCore.Platforms (>= 1.1)
Microsoft.NETCore.Targets (>= 1.1)
System.Globalization (>= 4.3)
System.Reflection (>= 4.3)
System.Runtime (>= 4.3)
System.Runtime (4.3)
Microsoft.NETCore.Platforms (>= 1.1)
Microsoft.NETCore.Targets (>= 1.1)
System.Runtime.CompilerServices.Unsafe (4.5.1)
System.Runtime.Extensions (4.3)
Microsoft.NETCore.Platforms (>= 1.1)
Microsoft.NETCore.Targets (>= 1.1)
System.Runtime (>= 4.3)
System.Runtime.Handles (4.3)
Microsoft.NETCore.Platforms (>= 1.1)
Microsoft.NETCore.Targets (>= 1.1)
System.Runtime (>= 4.3)
System.Runtime.InteropServices (4.3)
Microsoft.NETCore.Platforms (>= 1.1)
Microsoft.NETCore.Targets (>= 1.1)
System.Reflection (>= 4.3)
System.Reflection.Primitives (>= 4.3)
System.Runtime (>= 4.3)
System.Runtime.Handles (>= 4.3)
System.Runtime.InteropServices.WindowsRuntime (4.3)
System.Runtime (>= 4.3)
System.Security.AccessControl (4.5)
System.Security.Principal.Windows (>= 4.5)
System.Security.Principal.Windows (4.5)
System.Text.Encoding (4.3)
Microsoft.NETCore.Platforms (>= 1.1)
Microsoft.NETCore.Targets (>= 1.1)
System.Runtime (>= 4.3)
System.Text.Encoding.Extensions (4.3)
Microsoft.NETCore.Platforms (>= 1.1)
Microsoft.NETCore.Targets (>= 1.1)
System.Runtime (>= 4.3)
System.Text.Encoding (>= 4.3)
System.Threading (4.3)
System.Runtime (>= 4.3)
System.Threading.Tasks (>= 4.3)
System.Threading.Overlapped (4.3)
Microsoft.NETCore.Platforms (>= 1.1)
System.Resources.ResourceManager (>= 4.3)
System.Runtime (>= 4.3)
System.Runtime.Handles (>= 4.3)
System.Threading.Tasks (4.3)
Microsoft.NETCore.Platforms (>= 1.1)
Microsoft.NETCore.Targets (>= 1.1)
System.Runtime (>= 4.3)
System.Threading.Thread (4.3)
System.Runtime (>= 4.3)
System.Threading.ThreadPool (4.3)
System.Runtime (>= 4.3)
System.Runtime.Handles (>= 4.3)
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
</PropertyGroup>

<ItemGroup>
<Compile Include="Library.fs" />
</ItemGroup>

</Project>
<?xml version="1.0" encoding="utf-8"?>
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<Compile Include="Https.fs" />
</ItemGroup>
<Import Project="..\..\.paket\Paket.Restore.targets" />
</Project>
6 changes: 3 additions & 3 deletions src/Fable.Import.Firebase.Functions/Https.fs
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ module Fable.Import.Firebase.Functions.Https
open Fable.Import
open Fable.Core

type [<AllowNullLiteral>] HttpsFunction =
type [<AllowNullLiteral>] IHttpsFunction =
interface end

type [<AllowNullLiteral>] IExports =
abstract onRequest: handler: (express.Request -> express.Response -> unit) -> HttpsFunction
abstract onRequest: handler: (express.Request -> express.Response -> unit) -> IHttpsFunction

let [<Fable.Core.Import("https", "firebase-functions")>] https: Https.IExports = jsNative
let [<Fable.Core.Import("https", "firebase-functions")>] https: IExports = jsNative
3 changes: 3 additions & 0 deletions src/Fable.Import.Firebase.Functions/paket.references
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
FSharp.Core
Fable.Core
Fable.Import.Express

0 comments on commit 9695b23

Please sign in to comment.