我可以用MSBuild构建我的解决方案。它运行grunt并在解决方案目录中生成一个“dist”文件夹,然后MSBuild将这些文件复制到$(OutDir)
。如何通过MSBuild在AppHarbor上运行grunt?
假设我的解决方案被称为 MySolution.sln
。我旁边叫after.MySolution.sln.targets
另一个文件,其中包含
<!--?xml version="1.0" encoding="utf-8"?-->
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Target Name="Grunt" AfterTargets="Build">
<Exec Command="grunt build --no-color" WorkingDirectory="$(MSBuildProjectDirectory)" />
<ItemGroup>
<DistFiles Include="$(MSBuildProjectDirectory)\dist\**\*.*" />
</ItemGroup>
<Copy SourceFiles="@(DistFiles)" DestinationFolder="$(OutDir)\www\%(RecursiveDir)" />
</Target>
</Project>
当AppHarbor构建的解决方案,我收到此错误
Grunt:
grunt build --no-color
'grunt' is not recognized as an internal or external command,
operable program or batch file.
这是可以理解的,如果咕噜-CLI是不是已经被AppHarbor提供。那么我怎么能在AppHarbor上运行我的咕噜声呢?
注:从技术上讲,成功运行的呼噜声,我需要运行npm install
和bower install
,这样的荣誉,如果答案也包括咕噜包和亭子包!
对于downvote非常抱歉 - 这是无意的,应该是upvote,但我只是意识到太迟了 – Fatal