Skip to content

Commit

Permalink
Build group for fake. Different Bootstrap files. mode for webpack
Browse files Browse the repository at this point in the history
  • Loading branch information
rommsen committed Apr 10, 2018
1 parent a6a9055 commit a7042be
Show file tree
Hide file tree
Showing 7 changed files with 48 additions and 25 deletions.
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -395,3 +395,4 @@ paket-files/
tests
*eventstore.json
.history/
packages/*
2 changes: 1 addition & 1 deletion build.cmd
Expand Up @@ -6,4 +6,4 @@ if errorlevel 1 (
exit /b %errorlevel%
)

packages\FAKE\tools\FAKE.exe build.fsx %*
packages\build\FAKE\tools\FAKE.exe build.fsx %*
9 changes: 5 additions & 4 deletions build.fsx
Expand Up @@ -2,7 +2,7 @@
// FAKE build script
// --------------------------------------------------------------------------------------

#r "./packages/FAKE/tools/FakeLib.dll"
#r @"packages/build/FAKE/tools/FakeLib.dll"

open Fake
open System
Expand Down Expand Up @@ -100,14 +100,15 @@ Target "InstallClient" (fun _ ->
run nodeTool "--version" __SOURCE_DIRECTORY__
printfn "Yarn version:"
run yarnTool "--version" __SOURCE_DIRECTORY__
run yarnTool "install" __SOURCE_DIRECTORY__
runDotnet clientPath "restore"
run yarnTool "install --frozen-lockfile" __SOURCE_DIRECTORY__
)

Target "BuildClient" (fun _ ->
runDotnet clientPath "fable yarn-run build"
runDotnet clientPath "restore"
runDotnet clientPath "fable webpack --port free -- -p --mode production"
)


Target "RunFixtures" (fun _ ->
runDotnet supportPath "run"
)
Expand Down
46 changes: 29 additions & 17 deletions build.sh
@@ -1,20 +1,32 @@
#!/bin/bash
if test "$OS" = "Windows_NT"
#!/usr/bin/env bash

set -eu

cd "$(dirname "$0")"

PAKET_EXE=.paket/paket.exe
FAKE_EXE=packages/build/FAKE/tools/FAKE.exe

FSIARGS=""
FSIARGS2=""
OS=${OS:-"unknown"}
if [ "$OS" != "Windows_NT" ]
then
# use .Net
.paket/paket.exe restore
exit_code=$?
if [ $exit_code -ne 0 ]; then
exit $exit_code
fi
# Can't use FSIARGS="--fsiargs -d:MONO" in zsh, so split it up
# (Can't use arrays since dash can't handle them)
FSIARGS="--fsiargs"
FSIARGS2="-d:MONO"
fi

packages/FAKE/tools/FAKE.exe $@ --fsiargs build.fsx
else
# use mono
mono .paket/paket.exe restore
exit_code=$?
if [ $exit_code -ne 0 ]; then
exit $exit_code
run() {
if [ "$OS" != "Windows_NT" ]
then
mono "$@"
else
"$@"
fi
mono packages/FAKE/tools/FAKE.exe $@ --fsiargs -d:MONO build.fsx
fi
}

run $PAKET_EXE restore
run $FAKE_EXE "$@" $FSIARGS $FSIARGS2 build.fsx

2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -8,7 +8,7 @@
"prestartClient":
"concurrently \"npm run restoreClient\" \"npm run restoreNetClient\" ",
"startClient":
"cd src/Client && dotnet fable webpack-dev-server --port free"
"cd src/Client && dotnet fable webpack-dev-server --port free --mode development"
},
"keywords": [],
"author": "",
Expand Down
6 changes: 5 additions & 1 deletion paket.dependencies
Expand Up @@ -3,7 +3,6 @@ storage:none

nuget FSharp.Core

nuget FAKE
nuget FsUnit
nuget Fulma
nuget Fulma.Extensions
Expand All @@ -28,3 +27,8 @@ nuget jose-jwt
nuget dotnet-test-nunit

clitool dotnet-fable

group Build
source https://nuget.org/api/v2
framework >= net461
nuget FAKE
7 changes: 6 additions & 1 deletion paket.lock
Expand Up @@ -63,7 +63,6 @@ NUGET
Fable.Core (>= 1.3.7) - restriction: >= netstandard1.6
Fable.Import.Browser (>= 0.1) - restriction: >= netstandard1.6
FSharp.Core (>= 4.2.3) - restriction: >= netstandard1.6
FAKE (4.64.11)
FSharp.Compiler.Service (22.0.3) - restriction: >= netcoreapp2.0
FSharp.Core (>= 4.1.18) - restriction: || (>= net45) (>= netstandard2.0)
Microsoft.DiaSymReader (>= 1.1) - restriction: || (>= net45) (>= netstandard2.0)
Expand Down Expand Up @@ -1108,3 +1107,9 @@ NUGET
System.Xml.ReaderWriter (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net46) (>= netstandard1.3) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)
System.Xml.XmlDocument (>= 4.3) - restriction: || (&& (< monoandroid) (< monotouch) (>= netstandard1.3) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (>= net46)
System.Xml.XPath (>= 4.3) - restriction: || (&& (< monoandroid) (< monotouch) (>= netstandard1.3) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (>= net46)

GROUP Build
RESTRICTION: >= net461
NUGET
remote: https://www.nuget.org/api/v2
FAKE (4.64.11)

0 comments on commit a7042be

Please sign in to comment.