Created
August 12, 2018 22:49
-
-
Save A2H111/828c70969c2bcf41aae2d011a2029229 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<Target Name="AfterBuild"> | |
<!-- Ensure Node.js is installed --> | |
<Exec Command="node --version" ContinueOnError="true"> | |
<Output TaskParameter="ExitCode" PropertyName="ErrorCode" /> | |
</Exec> | |
<Error Condition="'$(ErrorCode)' != '0'" Text="Node.js is required to build and run this project. To continue, please install Node.js from https://nodejs.org/, and then restart your command prompt or IDE." /> | |
<Exec Command="ng build " WorkingDirectory="$(ProjectDir)" Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' " /> | |
<Exec Command="ng build" WorkingDirectory="$(ProjectDir)" Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' " /> | |
<ItemGroup> | |
<_CustomFiles Include="dist\**\*" /> | |
<FilesForPackagingFromProject Include="%(_CustomFiles.Identity)"> | |
<DestinationRelativePath>%(RecursiveDir)%(Filename)%(Extension) | |
</DestinationRelativePath> | |
</FilesForPackagingFromProject> | |
</ItemGroup> | |
</Target> | |
<PropertyGroup> | |
<ExcludeFoldersFromDeployment> | |
bin;src | |
</ExcludeFoldersFromDeployment> | |
<CopyAllFilesToSingleFolderForPackageDependsOn> | |
AfterBuild; | |
</CopyAllFilesToSingleFolderForPackageDependsOn> | |
<CopyAllFilesToSingleFolderForMsdeployDependsOn> | |
AfterBuild; | |
</CopyAllFilesToSingleFolderForMsdeployDependsOn> | |
</PropertyGroup> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment