Skip to content

Simple getting started guide for F# scripting for newcomers to language

License

Notifications You must be signed in to change notification settings

daz10000/FSharpScriptingExample

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Bootstrapping FSharp scripting experience

One time globally

  1. install dotnet core 3.0+ (with sdk)

Once per new project folder

dotnet new tool-manifest
dotnet tool install fake-cli
dotnet tool install paket
  1. Then in your build.sh: (assumes you use git bash)
#!/bin/bash
dotnet tool restore
dotnet paket restore
dotnet fake build "$@"

Create your project

Create (example) build.fsx:

#r @"paket:
nuget XPlot.GoogleCharts
"

open XPlot.GoogleCharts

let histo = [| [(100.0,100.0) ; (200.0,100.0) ; (300.0,150.0)] |]

histo
    |> Seq.ofArray
    |> Chart.Combo
    |> Chart.WithOptions 
         (Options(title = "My plot"))
    |> Chart.WithLabels ["Woo"]
    |> Chart.WithLegend false
    |> Chart.WithSize (600, 250)
    |> Chart.Show

Compile and run

./build.sh run

About

Simple getting started guide for F# scripting for newcomers to language

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published