Fable.Package.SDK is a set of MSBuild targets and tasks that help you build and package Fable projects.
PackageTags
based on the FablePackageType
propertyPackageTags
propertyGenerateDocumentationFile
to true
DebugType
to embedded
EmbedUntrackedSources
to true
dotnet add package Fable.Package.SDK
FablePackageType
propertySet the FablePackageType
property in your project file to one of the following values:
library
: If your package is a library that can be used by Fable.
Examples of libraries could be Fable.Promise, Elmish, Thoth.Json, Feliz
This will include the source files in the package.
binding
: If your package consist of a set of API to make a native library available
For example:
Only the DLL will be included in the package, allowing for a faster build and smaller package size.
Choose one or more of the following tags:
fable-dart
: Dart is supported by the packagefable-dotnet
: .NET is supported by the packagefable-javascript
: JavaScript is supported by the packagefable-python
: Python is supported by the packagefable-rust
: Rust is supported by the packagefable-all
: Package is compatible with all Fable targets.[!WARNING] A package can be compatible with all targets if it depends only on packages that are also compatible with all targets.
A package compatible with all targets cannot be a binding, as these are target-specific.
Example:
If your package supports only JavaScript you need to use fable-javascript
If your package supports both JavaScript and Python, you need to use fable-javascript
and fable-python
If your package is a binding which target JavaScript you need to write:
<PropertyGroup>
<PackageTags>fable-javascript</PackageTags>
<FablePackageType>binding</FablePackageType>
</PropertyGroup>
If your package is a library which targets JavaScript and Python you need to write:
<PropertyGroup>
<PackageTags>fable-javascript;fable-python</PackageTags>
<FablePackageType>library</FablePackageType>
</PropertyGroup>