Skip to content

Commit

Permalink
Merge pull request #35 from Lombiq/issue/OSOE-593
Browse files Browse the repository at this point in the history
OSOE-593: Extract <Exec> task into overridable target _NpmDotnetPrebuild
  • Loading branch information
dministro authored Apr 14, 2023
2 parents 398dcbd + b031ec5 commit aa1ddab
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions Lombiq.Npm.Targets.targets
Original file line number Diff line number Diff line change
Expand Up @@ -57,15 +57,19 @@
Inputs="@(NpmDotnetPrebuildWatchedFiles)"
Outputs="$(NpmDotnetPrebuildStampFile)"
Condition="'$(ExecDotnetPrebuildCommand)' == 'true' AND Exists($(PackageJson))">
<CallTarget Targets="_NpmDotnetPrebuild" />
<Touch Files="$(NpmDotnetPrebuildStampFile)"
Condition="'$(CreateDotnetPrebuildStampFile)' == 'true'"
AlwaysCreate="true" />
</Target>

<Target Name="_NpmDotnetPrebuild">
<Exec Command="$(NpmDotnetPrebuildCommand)"
ConsoleToMSBuild="true"
WorkingDirectory="$(NpmTargetsWorkingDirectory)"
EnvironmentVariables="@(NpmCommandsEnvironmentVariables)">
<Output TaskParameter="ConsoleOutput" PropertyName="PrebuildOutput" />
</Exec>
<Touch Files="$(NpmDotnetPrebuildStampFile)"
Condition="'$(CreateDotnetPrebuildStampFile)' == 'true'"
AlwaysCreate="true" />
</Target>

</Project>

0 comments on commit aa1ddab

Please sign in to comment.