Utility for creating an F# solution/workspace using dotnet core 2.0 with:
Multi project setup:
RunWatch
to watch the file system for changes and build/run tests/executable on each source file change - just do build.cmd RunWatch
.paket install
to get the initial dependenciesgit init
and adds all the filesSimple setup (--single-project
or --no-build
):
--no-build
option is a single project without Fake builds, but still using Paket.For anything simpler, for example, no project, no fake and perhaps just paket to fetch some depedencies, you
might as well just use paket
or the dotnet
cli directly along with .fsx
interactive file(s).
# Create solution 'FooProject' in a subfolder of the working directory
python3 fsharp-netcore-skeleton.py FooProject --console --watcher
# Create a solution 'FooProject' in a specific directory
python3 fsharp-netcore-skeleton.py ~/dev/FooProject --console --watcher
# Create a solution 'FooProject' in a specific directory and overwrite files as needed
python3 fsharp-netcore-skeleton.py ~/dev/FooProject --classlib --force
# Create a single project 'FooProject' with no solution and don't initialise git
python3 fsharp-netcore-skeleton.py ~/dev/FooProject --console --single-project --nogit
The options are documented through DocOpt.
The build.fsx
file should then be tweaked: project
, summary
and maybe dotnetcliVersion
before running build.cmd
.
build.cmd
runs the All
build targets (everything except RunWatch
) doing a full rebuild. The sample Expecto tests have some initially failing examples that need fixing for the build to be green. Note, if wanting to only watch and re-run tests everytime the source changes (and not run an executable), then the VSCode Ionide plugin can do that.
Project Scaffold is currently a better alternative if using the non-crossplatform .net framework. This skeleton is single project + test project only.
Forge may do some or all of the work of this skeleton, but it is currently also not dotnet core.
SAFE-Stack bookstore project is a good example of a combined client/server project similar to this skeleton using the Fable F# to JS compiler for the frontend.