Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Hello World example to FAKE 5 docs #1748

Merged
merged 1 commit into from
Jan 2, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 41 additions & 1 deletion help/markdown/fake-dotnetcore.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,47 @@ The disadvantage is that you need to have a dotnet sdk installed.
Note that with the "new" API you should call the modules directly instead of opening them.
Therefore this example is actually pretty bad because it just opened everything (for minimal diff to the "normal" build.fsx)

TBD.
### Minimal example

Create a file named build.fsx with the following contents:
```
(* -- Fake Dependencies paket-inline
source https://api.nuget.org/v3/index.json

nuget Fake.Core.Target
-- Fake Dependencies -- *)
// include Fake modules, see Fake modules section

open Fake.Core

// *** Define Targets ***
Target.Create "Clean" (fun _ ->
Trace.log " --- Cleaning stuff --- "
)

Target.Create "Build" (fun _ ->
Trace.log " --- Building the app --- "
)

Target.Create "Deploy" (fun _ ->
Trace.log " --- Deploying app --- "
)

open Fake.Core.TargetOperators

// *** Define Dependencies ***
"Clean"
==> "Build"
==> "Deploy"

// *** Start Build ***
Target.RunOrDefault "Deploy"
```

Run this file by executing
```
fake run build.fsx
```

## Downloads

Expand Down