csproj文件中新增NPM编译


      
<Target Name="NpmInstall" BeforeTargets="PrepareForBuild">
    <Message Importance="high" Text="安装NPM框架依赖,请稍候..."></Message>
    <Exec WorkingDirectory="SPA" Command="npm install" ContinueOnError="false">
    </Exec>
    <Message Importance="high" Text="正在编译新版本,请稍候..."></Message>
    <Exec WorkingDirectory="SPA" Command="npm run build:prod" ContinueOnError="false">
    </Exec>
    <Message Importance="high" Text="正在删除资源文件"></Message>
    <Exec WorkingDirectory="static" Command="del /Q *" ContinueOnError="true">
    </Exec>
    <Message Importance="high" Text="正在复制新文件"></Message>
    <Exec WorkingDirectory="SPA" Command="xcopy dist\* ..\ /s /h /y" ContinueOnError="false">
    </Exec>
  </Target>