diff --git a/docs/recipes/build/docker-image.md b/docs/recipes/build/docker-image.md index 537e02f6d..1280f1a75 100644 --- a/docs/recipes/build/docker-image.md +++ b/docs/recipes/build/docker-image.md @@ -39,6 +39,13 @@ RUN apt-get update && apt-get install nodejs -y WORKDIR /workspace COPY . . + +# Install npm dependencies +WORKDIR /workspace/src/Client +RUN npm ci + +# Restore tools and build +WORKDIR /workspace RUN dotnet tool restore RUN dotnet run Bundle @@ -118,8 +125,8 @@ COPY src/Server src/Server RUN cd src/Server && dotnet publish -c release -o ../../deploy FROM build as client-build -COPY package.json package-lock.json ./ -RUN npm install +COPY src/Client/package.json src/Client/package-lock.json src/Client/ +RUN cd src/Client && npm install COPY src/Shared src/Shared COPY src/Client src/Client # tailwind.config.js needs to be in the dir where the diff --git a/docs/recipes/upgrading/v4-to-v5.md b/docs/recipes/upgrading/v4-to-v5.md index a73cad3f9..515c72d85 100644 --- a/docs/recipes/upgrading/v4-to-v5.md +++ b/docs/recipes/upgrading/v4-to-v5.md @@ -33,6 +33,7 @@ 1. `dotnet paket add --keep-minor`. This will download the latest version of the package you required *but will not update any associated dependencies outside of their existing major version*. ### Javascript tools and dependencies +1. **Move package.json & package-lock.json to `src/Client`** 1. **Update all dependencies.** 1. Replace `package.json` with [this file](https://raw.githubusercontent.com/SAFE-Stack/SAFE-template/master/Content/default/package.json). 1. Replace `package-lock.json` with [this file](https://raw.githubusercontent.com/SAFE-Stack/SAFE-template/master/Content/default/package-lock.json).