Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge branch 'master' of https://github.com/drlongnecker/cassette int…

…o drlongnecker-master
  • Loading branch information...
commit 916c3448852de04020abcd48d3471821733b4f56 2 parents 43c1f53 + 69c416c
@andrewdavey andrewdavey authored
View
31 src/Website/Views/Documentation/Configuration_AddFile.cshtml
@@ -0,0 +1,31 @@
+@{
+ ViewBag.Title = "Cassette | Add File";
+ ViewBag.Description = "How to add bundles a single file.";
+}
+
+<h1>Add File</h1>
+
+<p>A bundle can be added using a single file, for example, a .less with additional <span class="code-type">&#64;import</span> statements. Each file set can then be a Cassette bundle.</p>
+
+<p>Here's an example structure:</p>
+
+<pre>Content/
+- Libraries/
+ - primary.less
+ - reset.less
+ - variables.less
+</pre>
+
+<p>Inside of <code>primary.less</code> could exist an <span class="code-type">&#64;import</span> structure:</p>
+
+<pre><code><span class="tag">&#64;import</span> "reset.less";
+<span class="tag">&#64;import</span> "variables.less";</code></pre>
+
+<p>By explicitly specifying a file, Cassette only loads that file and the assets specified by that file.</p>
+<pre><code><span class="keyword">public</span> <span class="keyword">class</span> <span class="code-type">CassetteConfiguration</span> : <span class="code-type">ICassetteConfiguration</span>
+{
+ <span class="keyword">public</span> <span class="keyword">void</span> Configure(<span class="code-type">BundleCollection</span> bundles, <span class="code-type">CassetteSettings</span> settings)
+ {
+ bundles.Add&lt;<span class="code-type">StylesheetBundle</span>&gt;(<span class="string">"Content/Libraries/primary.less"</span>);
+ }
+}</code></pre>
View
1  src/Website/Views/Documentation/_Documentation.cshtml
@@ -34,6 +34,7 @@
@DocLink("configuration", "Configuration")
<ul>
<li>@DocLink("configuration/add-directory", "Add Directory")</li>
+ <li>@DocLink("configuration/add-file", "Add File")</li>
<li>@DocLink("configuration/add-per-sub-directory", "Add Per Sub-Directory")</li>
<li>@DocLink("configuration/bundle-descriptor-file", "Bundle Descriptor File")</li>
</ul>
View
3  src/Website/Website.csproj
@@ -245,6 +245,9 @@
<ItemGroup>
<Content Include="Views\Shared\_Share.cshtml" />
</ItemGroup>
+ <ItemGroup>
+ <Content Include="Views\Documentation\Configuration_AddFile.cshtml" />
+ </ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Please sign in to comment.
Something went wrong with that request. Please try again.