forked from Teleopti/NodeEnv
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnode.targets
More file actions
executable file
·37 lines (28 loc) · 1.51 KB
/
node.targets
File metadata and controls
executable file
·37 lines (28 loc) · 1.51 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">$(MSBuildProjectDirectory)\..\</SolutionDir>
<!-- Node Directory -->
<NodeDir>$(MSBuildProjectDirectory)\.node\</NodeDir>
<!-- Path to Node.exe -->
<NodeCmd>$(NodeDir)node</NodeCmd>
<!-- Path to npm command -->
<NpmCmd>$(NodeDir)npm</NpmCmd>
<!-- Path to grunt command -->
<GruntCmd>$(NodeDir)grunt</GruntCmd>
<!-- Grunt Build Command -->
<GruntBuild>"$(GruntCmd)" --verbose --no-color</GruntBuild>
<!-- NPM install command -->
<NpmInstallCmd>"$(NpmCmd)" install</NpmInstallCmd>
</PropertyGroup>
<!-- Runs NPM command -->
<Target Name="RestoreNodePackages">
<Message Text="Restore Node Packages Command: $(NpmInstallCmd) /w WorkingDirectory: $(NodeDir)" Importance="high" />
<Exec Command="$(NpmInstallCmd)" ContinueOnError="false" WorkingDirectory="$(NodeDir)" />
</Target>
<!-- Executes Build -->
<Target Name="RunGruntBuild">
<Message Text="Executing Node.JS Builds: $(GruntBuild)" Importance="high" />
<Exec ContinueOnError="false" WorkingDirectory="$(MSBuildProjectDirectory)\.node" Command="$(GruntBuild)" />
</Target>
</Project>