-
-
Save smockle/6544205 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Web; | |
using System.Web.Optimization; | |
using BundleTransformer.Core.Transformers; | |
namespace Project { | |
public class BundleConfig { | |
public static void RegisterBundles(BundleCollection bundles) { | |
var styles = new Bundle("~/bundles/stylesheets") | |
.Include("~/Assets/stylesheets/*.css") | |
.Include("~/Assets/stylesheets/*.less"); | |
styles.Transforms.Add(new CssTransformer()); | |
bundles.Add(new ScriptBundle("~/bundles/javascripts").IncludeDirectory("~/Assets/javascripts/plugins", "*.js").IncludeDirectory("~/Assets/javascripts", "*.js")); | |
bundles.Add(styles); | |
} | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Web; | |
using System.Web.Hosting; | |
using System.Web.Http; | |
using System.Web.Mvc; | |
using System.Web.Optimization; | |
using System.Web.Routing; | |
namespace Project { | |
public class MvcApplication : System.Web.HttpApplication { | |
protected void Application_Start() { | |
FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters); | |
RouteConfig.RegisterRoutes(RouteTable.Routes); | |
BundleConfig.RegisterBundles(BundleTable.Bundles); | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<%= Styles.Render("~/bundles/stylesheets") %> | |
<%= Scripts.Render("~/bundles/javascripts") %> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<configuration> | |
<bundleTransformer xmlns="http://tempuri.org/BundleTransformer.Configuration.xsd"> | |
<core> | |
<css> | |
<minifiers> | |
<add name="NullMinifier" type="BundleTransformer.Core.Minifiers.NullMinifier, BundleTransformer.Core" /> | |
</minifiers> | |
<translators> | |
<add name="NullTranslator" type="BundleTransformer.Core.Translators.NullTranslator, BundleTransformer.Core" enabled="false" /> | |
<add name="LessTranslator" type="BundleTransformer.Less.Translators.LessTranslator, BundleTransformer.Less" /></translators> | |
</css> | |
<js> | |
<minifiers> | |
<add name="NullMinifier" type="BundleTransformer.Core.Minifiers.NullMinifier, BundleTransformer.Core" /> | |
</minifiers> | |
<translators> | |
<add name="NullTranslator" type="BundleTransformer.Core.Translators.NullTranslator, BundleTransformer.Core" enabled="false" /> | |
</translators> | |
</js> | |
</core> | |
<less> | |
<jsEngine name="V8JsEngine" /> | |
</less> | |
</bundleTransformer> | |
<jsEngineSwitcher xmlns="http://tempuri.org/JavaScriptEngineSwitcher.Configuration.xsd"> | |
<core> | |
<engines> | |
<add name="V8JsEngine" type="JavaScriptEngineSwitcher.V8.V8JsEngine, JavaScriptEngineSwitcher.V8" /> | |
</engines> | |
</core> | |
</jsEngineSwitcher> | |
</configuration> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment