Skip to content

attempt to fix npm build #13102

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions eng/targets/Npm.Common.props
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@
<NpmTestArgs>test</NpmTestArgs>
<Configuration Condition="'$(Configuration)' == '' AND '$(ContinuousIntegrationBuild)' == 'true'">Release</Configuration>
<Configuration Condition="'$(Configuration)' == ''">Debug</Configuration>
<PackOnBuild>false</PackOnBuild>
</PropertyGroup>
</Project>
11 changes: 8 additions & 3 deletions eng/targets/Npm.Common.targets
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,9 @@
BuildInParallel="true" />
</Target>

<Target Name="Build" DependsOnTargets="$(BuildDependsOn)" />
<Target Name="Build" DependsOnTargets="$(BuildDependsOn)">
<CallTarget Targets="_Pack" Condition="'$(PackOnBuild)' == 'true'" />
</Target>

<Target Name="_Build"
Condition="'$(IsBuildable)' != 'false'"
Expand All @@ -66,11 +68,12 @@
</PackDependsOn>
<PackDependsOn Condition="'$(NoBuild)' != 'true'">
$(PackDependsOn);
Build
Build;
_Pack
</PackDependsOn>
</PropertyGroup>

<Target Name="Pack" Condition="'$(IsPackable)' == 'true'" DependsOnTargets="$(PackDependsOn)">
<Target Name="_Pack" Condition="'$(IsPackable)' == 'true'" >
<PropertyGroup>
<_PackageTargetPath>$(MSBuildProjectDirectory)\$(PackageFileName)</_PackageTargetPath>
</PropertyGroup>
Expand All @@ -88,6 +91,8 @@
<OnError ExecuteTargets="_RestoreBackupPackageJsonFile" />
</Target>

<Target Name="Pack" Condition="'$(IsPackable)' == 'true'" DependsOnTargets="$(PackDependsOn)" />

<Target Name="_RestoreBackupPackageJsonFile">
<Move SourceFiles="$(_BackupPackageJson)" DestinationFiles="$(PackageJson)" />
</Target>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
<IsPackable>true</IsPackable>
<IsTestProject>false</IsTestProject>
<IsShippingPackage>true</IsShippingPackage>
<PackOnBuild>true</PackOnBuild>
</PropertyGroup>

<ItemGroup>
Expand Down