added cassette MSBuild.

This commit is contained in:
kay.one 2013-01-21 22:00:23 -08:00
parent 2806b34e59
commit 53fa2f9410
5 changed files with 30 additions and 2 deletions

1
.gitignore vendored
View File

@ -127,3 +127,4 @@ NzbDrone.Web/MediaCover
UpdateLogs/
*/Bootstrap/*.css
*//Bootstrap/*.css
NzbDrone.Web/cassette-cache/*

View File

@ -0,0 +1,21 @@
<?xml version="1.0" encoding="utf-8" ?>
<!--
The web application csproj file has been modified to import this file.
So after a build, the Cassette bundles will be saved into a cache directory.
-->
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<UsingTask AssemblyFile="$(OutputPath)\Cassette.MSBuild.dll" TaskName="CreateBundles"/>
<Target Name="Bundle" AfterTargets="Build">
<CreateBundles />
<!--
CreateBundles has the following optional properties:
Source: The root directory of the web application.
Bin: The directory containing the web application assemblies. Default is "bin".
Output: The directory to save the created bundles to. Default is "cassette-cache".
IncludeOtherFiles: When true, non-bundled files such as images referenced by stylesheets are also copied to the output directory. Default is false.
The Web.config must also have the following section:
<cassette cacheDirectory="cassette-cache" />
-->
</Target>
</Project>

View File

@ -74,6 +74,9 @@
<Reference Include="Cassette.Less">
<HintPath>..\packages\Cassette.Less.2.0.0\lib\net40-client\Cassette.Less.dll</HintPath>
</Reference>
<Reference Include="Cassette.MSBuild">
<HintPath>..\packages\Cassette.MSBuild.2.0.0\lib\net40\Cassette.MSBuild.dll</HintPath>
</Reference>
<Reference Include="Cassette.Views">
<HintPath>..\packages\Cassette.Views.2.0.0\lib\net40\Cassette.Views.dll</HintPath>
</Reference>
@ -378,6 +381,7 @@
<Content Include="_backboneApp\JsLibraries\backbone.js" />
<Content Include="_backboneApp\JsLibraries\backbone.marionette.js" />
<Content Include="_backboneApp\AddSeries\addSeriesTemplate.html" />
<Content Include="Cassette.targets" />
<None Include="_backboneApp\JsLibraries\jquery-1.8.2.intellisense.js" />
<Content Include="_backboneApp\JsLibraries\jquery-1.8.2.js" />
<Content Include="_backboneApp\JsLibraries\jquery-ui-1.9.0.js" />
@ -782,4 +786,5 @@
xcopy /s /y "$(SolutionDir)packages\Microsoft.SqlServer.Compact.4.0.8876.1\NativeBinaries\x86\*.*" "$(TargetDir)x86"</PostBuildEvent>
</PropertyGroup>
<Import Project="$(SolutionDir)\.nuget\nuget.targets" />
</Project>
<Import Project="Cassette.targets" />
</Project>

View File

@ -6,7 +6,7 @@
<startup useLegacyV2RuntimeActivationPolicy="true">
<supportedRuntime version="v4.0" />
</startup>
<cassette rewriteHtml="true" />
<cassette rewriteHtml="true" cacheDirectory="cassette-cache" />
<appSettings>
<add key="ClientValidationEnabled" value="true" />
<add key="UnobtrusiveJavaScriptEnabled" value="true" />

View File

@ -7,6 +7,7 @@
<package id="Cassette" version="2.0.0" targetFramework="net40" />
<package id="Cassette.Aspnet" version="2.0.0" targetFramework="net40" />
<package id="Cassette.Less" version="2.0.0" targetFramework="net40" />
<package id="Cassette.MSBuild" version="2.0.0" targetFramework="net40" />
<package id="Cassette.Views" version="2.0.0" targetFramework="net40" />
<package id="DataTables.Mvc" version="0.1.0.85" />
<package id="DataTables.Mvc.Core" version="0.1.0.85" />