How do I ensure NPM and Nuget packages stay in sync?
For in-depth information about Femto, see Introducing Femto.
1. Install Femto
Navigate to the root folder of the solution and execute the following command:
dotnet tool install femto
2. Analyse Dependencies
In the root directory, run the following:
dotnet femto ./src/Client
alternatively, you can call femto directly from
cd ./src/Client dotnet femto
This will give you a report of discrepancies between the NuGet packages and the NPM packages for the project, as well as steps to take in order to resolve them.
3. Resolve Dependencies
To sync your NPM dependencies with your NuGet dependencies, you can either manually follow the steps returned by step 2, or resolve them automatically using the following command:
dotnet femto ./src/Client --resolve
Keeping your NPM dependencies in sync with your NuGet packages is now as easy as repeating step 3. Of course, you can instead repeat the step 2 and resolve packages manually, too.