#
NuGet packages
WebSharper uses NuGet packages to ship the core tools (the F#/C# to JS compilers, build automation, etc.) - often just referred to as WebSharper, proxies for the F# standard library and other .NET libraries, and bindings (also called "extensions") to JavaScript libraries. This makes it easy and predictable to add or update various WebSharper components in your applications.
#
Configuring the WebSharper developer feed
WebSharper and its components are available on NuGet.org. In addition, if you would also like to access the latest developer packages, you can find them on the WebSharper GitHub packages feed at https://nuget.pkg.github.com/dotnet-websharper/index.json:
> dotnet nuget list source
Registered Sources:
1. nuget.org [Enabled]
https://api.nuget.org/v3/index.json
2. dotnet-websharper-GitHub [Enabled]
https://nuget.pkg.github.com/dotnet-websharper/index.json
The standard NuGet feed should come configured on your system when installing the .NET SDK. If you want to configure the WebSharper GitHub feed as well, you can do so as follows:
dotnet nuget add source https://nuget.pkg.github.com/dotnet-websharper/index.json --name dotnet-websharper-GitHub --username <GH_USER> --password <PAT>
where GH_USER
is your GitHub username, and PAT
is your Personal Access Token (PAT) for your GitHub account.
At the time of writing, GitHub requires authentication to access packages on its Packages feed. To set your access up, create a new PAT at https://github.com/settings/tokens/new with the read:packages
scope, noting the expiration you configure.
If your project uses Paket, you will need to configure the above GitHub feed for Paket as well:
paket config add-credentials https://nuget.pkg.github.com/dotnet-websharper/index.json --username <GH-USER> --password <PAT>
#
Core NuGet packages
Below are some of the WebSharper NuGet packages that you will be working with:
#
Compiler packages
For more advanced use cases, where you need custom JavaScript compilation, you can use the following packages: