Skip to content

Commit

Permalink
Merge pull request #317 from SAFE-Stack/v5-docs-add-newget-package-to…
Browse files Browse the repository at this point in the history
…-client

Add recipe: 'add a nuget package to client' - no change from v4
  • Loading branch information
martinbryant authored Dec 18, 2023
2 parents 04315e9 + f3d1f8c commit b30a120
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
11 changes: 11 additions & 0 deletions docs/recipes/package-management/add-nuget-package-to-client.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# How do I add a NuGet package to the Client?
Adding packages to the Client project is a very [similar process to the Server](../add-nuget-package-to-server), with a few key differences:

- Any references to the `Server` directory should be `Client`

- Client code written in F# is converted into JavaScript using [Fable](https://fable.io/docs/index.html). Because of this, we must be careful to only reference libraries which are [Fable compatible](https://fable.io/docs/your-fable-project/use-a-fable-library.html).

- If the NuGet package uses any JS libraries you must install them.
For simplicity, [use Femto to sync](./sync-nuget-and-npm-packages.md) - if the NuGet package is compatible - or [install via NPM](./add-npm-package-to-client.md) manually, if not.

There are [lots of great libraries](../../awesome-safe-components.md) available to choose from.
2 changes: 1 addition & 1 deletion mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ nav:
- Package Management:
- Add an NPM package to the Client: "recipes/package-management/add-npm-package-to-client.md"
- Add a NuGet package to the Server: "recipes/package-management/add-nuget-package-to-server.md"
- Add a NuGet package to the Client: "recipes/package-management/add-nuget-package-to-client.md"
- Migrate to Paket from NuGet: "recipes/package-management/migrate-to-paket.md"
- Migrate to NuGet from Paket: "recipes/package-management/migrate-to-nuget.md"
- Sync NuGet and NPM Packages: "recipes/package-management/sync-nuget-and-npm-packages.md"
Expand Down Expand Up @@ -153,7 +154,6 @@ nav:
- Package Management:
- Add an NPM package to the Client: "v4-recipes/package-management/add-npm-package-to-client.md"
- Add a NuGet package to the Server: "v4-recipes/package-management/add-nuget-package-to-server.md"
- Add a NuGet package to the Client: "v4-recipes/package-management/add-nuget-package-to-client.md"
- Migrate to Paket from NuGet: "v4-recipes/package-management/migrate-to-paket.md"
- Migrate to NuGet from Paket: "v4-recipes/package-management/migrate-to-nuget.md"
- Sync NuGet and NPM Packages: "v4-recipes/package-management/sync-nuget-and-npm-packages.md"

0 comments on commit b30a120

Please sign in to comment.