Merge pull request #456 from yanchenw/dev
Set triggers for npm operation at SPA app in the csproj instead of dockerfile
This commit is contained in:
commit
02ed89f4fc
@ -10,8 +10,6 @@ WORKDIR /src/src/Web/WebMVC
|
|||||||
RUN dotnet build --no-restore -c Release -o /app
|
RUN dotnet build --no-restore -c Release -o /app
|
||||||
|
|
||||||
FROM build AS publish
|
FROM build AS publish
|
||||||
RUN bower install --allow-root
|
|
||||||
RUN dotnet bundle
|
|
||||||
RUN dotnet publish --no-restore -c Release -o /app
|
RUN dotnet publish --no-restore -c Release -o /app
|
||||||
|
|
||||||
FROM base AS final
|
FROM base AS final
|
||||||
|
@ -27,10 +27,10 @@
|
|||||||
<PackageReference Include="Microsoft.VisualStudio.Azure.Fabric.MSBuild" Version="1.6.3" />
|
<PackageReference Include="Microsoft.VisualStudio.Azure.Fabric.MSBuild" Version="1.6.3" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<!--<Target Name="PrepublishScript" BeforeTargets="PrepareForPublish">
|
<Target Name="PrepublishScript" BeforeTargets="PrepareForPublish">
|
||||||
<Exec Command="bower install - -allow-root" />
|
<Exec Command="bower install --allow-root" />
|
||||||
<Exec Command="dotnet bundle" Condition="'$(ASPNETCORE_ENVIRONMENT)'!='Development'" />
|
<Exec Command="dotnet bundle" Condition="'$(ASPNETCORE_ENVIRONMENT)'!='Development'" />
|
||||||
</Target>-->
|
</Target>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<DotNetCliToolReference Include="BundlerMinifier.Core" Version="2.5.357" />
|
<DotNetCliToolReference Include="BundlerMinifier.Core" Version="2.5.357" />
|
||||||
|
@ -10,9 +10,6 @@ WORKDIR /src/src/Web/WebSPA
|
|||||||
RUN dotnet build --no-restore -c Release -o /app
|
RUN dotnet build --no-restore -c Release -o /app
|
||||||
|
|
||||||
FROM build AS publish
|
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
|
RUN dotnet publish --no-restore -c Release -o /app
|
||||||
|
|
||||||
FROM base AS final
|
FROM base AS final
|
||||||
|
@ -37,14 +37,14 @@
|
|||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<!-- workaround for https://github.com/aspnet/websdk/issues/114 -->
|
<!-- 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 install" />
|
||||||
<Exec Command="npm run build:prod" />
|
<Exec Command="npm run build:prod" />
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<_GeneratedFiles Include="$(GeneratedItemPatterns)" />
|
<_GeneratedFiles Include="$(GeneratedItemPatterns)" />
|
||||||
<ContentWithTargetPath Include="@(_GeneratedFiles)" TargetPath="%(Identity)" CopyToPublishDirectory="PreserveNewest" />
|
<ContentWithTargetPath Include="@(_GeneratedFiles)" TargetPath="%(Identity)" CopyToPublishDirectory="PreserveNewest" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
</Target>-->
|
</Target>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<DotNetCliToolReference Include="Microsoft.DotNet.Watcher.Tools" Version="2.0.0" />
|
<DotNetCliToolReference Include="Microsoft.DotNet.Watcher.Tools" Version="2.0.0" />
|
||||||
|
Loading…
x
Reference in New Issue
Block a user