Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
19 changed files
with
918 additions
and
574 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
Binary file not shown.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,24 +1 @@ | ||
# SAFE Dojo | ||
|
||
This self-study repository is designed to allow you to experience the SAFE stack based on an ready-made application that you can build on top of. It will take around 90 minutes for you to complete if you have no experience in any of these technologies. | ||
|
||
The `master` branch has the "incomplete" solution; please read the [instructions.md](Instructions.md) for a guide on completing this dojo to learn all about the [SAFE Stack](https://safe-stack.github.io/) and F#. There is a "completed" version in the `suggested-solution` branch. | ||
|
||
## Prerequisites | ||
|
||
* [dotnet SDK 2.1.4 or higher](https://dotnet.microsoft.com/download) The .NET Core SDK including CLI tools | ||
* [FAKE 5](https://fake.build/fake-gettingstarted.html#Install-FAKE) F# build tool installed as a global tool | ||
* [Yarn](https://yarnpkg.com/lang/en/docs/install/) NPM package manager | ||
* [Node 10.x](https://nodejs.org/en/download/) installed for the front end components | ||
* [Mono](https://www.mono-project.com/docs/getting-started/install/) if you're running on Linux or OSX | ||
* An F# code editor such as: | ||
* [VS Code](https://code.visualstudio.com/) + [Ionide](https://github.com/ionide/ionide-vscode-fsharp) extension | ||
* [Visual Studio](https://www.visualstudio.com/downloads/) | ||
* [Jetbrains Rider](https://www.jetbrains.com/rider/) | ||
|
||
## Building | ||
`fake build -t run`. You can optionally use npm instead of yarn by supplying the `jsPackageManager=npm` argument e.g. `fake build -t run -e jsPackageManager=npm`. | ||
|
||
If you're in VS Code, you can simply hit `CTRL`+`SHIFT`+`B` to build and run the application. | ||
|
||
If using Visual Studio, [do NOT attempt to build the solution directly in VS](https://github.com/CompositionalIT/SAFE-Dojo/issues/24). You *must* use `fake build` to compile and run the application. |
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 @@ | ||
@echo off | ||
cls | ||
|
||
.paket\paket.exe restore -s | ||
if errorlevel 1 ( | ||
exit /b %errorlevel% | ||
) | ||
|
||
dotnet run --project buildProj\Build.fsproj %* |
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,21 @@ | ||
#!/bin/bash | ||
if test "$OS" = "Windows_NT" | ||
then | ||
# use .Net | ||
.paket/paket.exe restore | ||
exit_code=$? | ||
if [ $exit_code -ne 0 ]; then | ||
exit $exit_code | ||
fi | ||
|
||
else | ||
# use mono | ||
mono .paket/paket.exe restore | ||
exit_code=$? | ||
if [ $exit_code -ne 0 ]; then | ||
exit $exit_code | ||
fi | ||
|
||
fi | ||
|
||
dotnet run --project buildProj\Build.fsproj %* |
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,16 @@ | ||
module Build.Program | ||
|
||
open BlackFox.Fake | ||
|
||
[<EntryPoint>] | ||
let main argv = | ||
BuildTask.setupContextFromArgv argv | ||
|
||
let defaultTask = Tasks.createAndGetDefault() | ||
|
||
if argv.Length > 0 | ||
&& (argv.[0].ToLower().StartsWith("-h") || argv.[0].ToLower().StartsWith("--h" ) || argv.[0].ToLower()= "help" || argv.[0].ToLower()= "list" ) then | ||
Tasks.listAvailable() | ||
0 | ||
else | ||
BuildTask.runOrDefaultApp defaultTask |
Oops, something went wrong.