The template uses FAKE to build the application.
Generated FAKE script consist of two primary build targets, used for different purposes:
This target is a standard build procedure, consisting of following steps:
- InstallDotNetCore - here, a required version of dotnet core is read from
global.jsonfile and if not yet installed, the script downloads and performs the installation of desired dotnet core SDK.
- InstallClient - in this step, either NPM or Yarn is invoked (based on which option was chosen when generating project) and it installs all Client dependencies defined in
package.json. The step also performs
dotnet restoreto fetch NuGet-based packages used by front-end.
- Build - for server side
dotnet buildcommand is invoked, and for client side a special
dotnet-fableCLI tool using
dotnet fable webpackcommand with
This target is used for development purposes, and provides a great live-reload experience. It consists of following steps:
- InstallClient - same as above in
- RestoreServer -
dotnet restoreis invoked for Server to fetch all necessary packages (note
dotnet buildis skipped here),
- Run - most interesting part; in this step 3 separate actions are performed in parallel:
dotnet watch runfor Server side - compiles, runs Server and watches for changes in Server source files. Whenever a change in any source file is detected, Server is automatically stopped, recompiled and rerun in the background,
- New process is started for
http://localhost:8080to open the URL in default browser