Skip to content

Instantly share code, notes, and snippets.

@carlin-q-scott
Last active March 14, 2016 23:41
Show Gist options
  • Save carlin-q-scott/718361d78955f980205b to your computer and use it in GitHub Desktop.
Save carlin-q-scott/718361d78955f980205b to your computer and use it in GitHub Desktop.
<?xml version="1.0" encoding="utf-8" ?>
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<OutputWebroot>$(TargetDir)</OutputWebroot>
</PropertyGroup>
<ItemGroup>
<gruntInputs Include="Gruntfile.js"/>
<gruntInputs Include="app/**/*.js"/>
<gruntInputs Include="app/**/*.html"/>
<gruntInputs Include="content/**/*"/>
<gruntInputs Include="index.html"/>
<gruntOutputs Include="$(OutputWebroot)/**/*"/>
</ItemGroup>
<Target Name="npmInstall" Inputs="package.json" Outputs="node_modules" AfterTargets="BeforeBuild" BeforeTargets="CoreBuild">
<Message Text="npm install"/>
<Exec Command="npm --no-color install"
CustomErrorRegularExpression="^npm ERR!"
CustomWarningRegularExpression="^npm WARN"
Outputs="@(npmOutputs)"
/>
<Message Text="@(npmOutputs)"/>
</Target>
<Target Name="grunt" Inputs="@(gruntInputs)" Outputs="@(gruntOutputs)" AfterTargets="CoreBuild">
<Message Text="grunt"/>
<Exec Command="node_modules/.bin/grunt.cmd --no-color"
EnvironmentVariables="OutputWebroot=$(OutputWebroot)"
CustomErrorRegularExpression="^error"
CustomWarningRegularExpression="^warning"
Outputs="@(gruntOutputs)"
/>
<Message Text="@(gruntOutputs)"/>
</Target>
</Project>
@carlin-q-scott
Copy link
Author

Outputs takes either a string representing a single file or folder, or it takes an array. For npmInstall I only need it to watch an input file and output folder.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment