Browse Source

Merge pull request #456 from yanchenw/dev

Set triggers for npm operation at SPA app in the csproj instead of dockerfile
pull/441/merge
Cesar De la Torre 7 years ago
committed by GitHub
parent
commit
02ed89f4fc
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 5 additions and 10 deletions
  1. +0
    -2
      src/Web/WebMVC/Dockerfile
  2. +3
    -3
      src/Web/WebMVC/WebMVC.csproj
  3. +0
    -3
      src/Web/WebSPA/Dockerfile
  4. +2
    -2
      src/Web/WebSPA/WebSPA.csproj

+ 0
- 2
src/Web/WebMVC/Dockerfile View File

@ -10,8 +10,6 @@ WORKDIR /src/src/Web/WebMVC
RUN dotnet build --no-restore -c Release -o /app
FROM build AS publish
RUN bower install --allow-root
RUN dotnet bundle
RUN dotnet publish --no-restore -c Release -o /app
FROM base AS final


+ 3
- 3
src/Web/WebMVC/WebMVC.csproj View File

@ -27,10 +27,10 @@
<PackageReference Include="Microsoft.VisualStudio.Azure.Fabric.MSBuild" Version="1.6.3" />
</ItemGroup>
<!--<Target Name="PrepublishScript" BeforeTargets="PrepareForPublish">
<Exec Command="bower install - -allow-root" />
<Target Name="PrepublishScript" BeforeTargets="PrepareForPublish">
<Exec Command="bower install --allow-root" />
<Exec Command="dotnet bundle" Condition="'$(ASPNETCORE_ENVIRONMENT)'!='Development'" />
</Target>-->
</Target>
<ItemGroup>
<DotNetCliToolReference Include="BundlerMinifier.Core" Version="2.5.357" />


+ 0
- 3
src/Web/WebSPA/Dockerfile View File

@ -10,9 +10,6 @@ WORKDIR /src/src/Web/WebSPA
RUN dotnet build --no-restore -c Release -o /app
FROM build AS publish
RUN npm rebuild node-sass
RUN npm install
RUN npm run build:prod
RUN dotnet publish --no-restore -c Release -o /app
FROM base AS final


+ 2
- 2
src/Web/WebSPA/WebSPA.csproj View File

@ -37,14 +37,14 @@
</ItemGroup>
<!-- workaround for https://github.com/aspnet/websdk/issues/114 -->
<!--<Target Name="PrepublishScript" BeforeTargets="PrepareForPublish">
<Target Name="PrepublishScript" BeforeTargets="PrepareForPublish">
<Exec Command="npm install" />
<Exec Command="npm run build:prod" />
<ItemGroup>
<_GeneratedFiles Include="$(GeneratedItemPatterns)" />
<ContentWithTargetPath Include="@(_GeneratedFiles)" TargetPath="%(Identity)" CopyToPublishDirectory="PreserveNewest" />
</ItemGroup>
</Target>-->
</Target>
<ItemGroup>
<DotNetCliToolReference Include="Microsoft.DotNet.Watcher.Tools" Version="2.0.0" />


Loading…
Cancel
Save