my code stock.com

Snippet options

Download: Download snippet as cassette-configuration.java.
Copy snippet: For this you need a free my code stock.com account.
Embed code : You will find the embed code for this snippet at the end of the page, if you want to embed it into a website or a blog!

public class CassetteConfiguration : ICassetteConfiguration
{
    public void Configure(BundleCollection bundles, CassetteSettings settings)
    {
        #region CDNs

        bundles.AddUrlWithLocalAssets(
            "http://yui.yahooapis.com/2.9.0/build/reset/reset-min.css",
            new LocalAssetSettings
                {
                    Path = "~/Content/reset-min.css",
                }
            );

        bundles.AddUrlWithLocalAssets(
            "http://ajax.aspnetcdn.com/ajax/jquery.templates/beta1/jquery.tmpl.min.js",
            new LocalAssetSettings
                {
                    Path = "~/Scripts/jQuery.tmpl.min.js",
                    FallbackCondition = "typeof jQuery.tmpl == 'undefined'",
                }
            );

        bundles.AddUrlWithLocalAssets(
            "http://www.google.com/recaptcha/api/js/recaptcha_ajax.js",
            new LocalAssetSettings
                {
                    Path = "~/Scripts/recaptcha_ajax.js",
                    FallbackCondition = "typeof Recasptcha == 'undefined'",
                }
            );


        bundles.AddUrlWithLocalAssets(
            "http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js",
            new LocalAssetSettings
                {
                    Path = "~/Scripts/jquery-1.7.1.min.js",
                    FallbackCondition = "!window.jQuery",
                }
            );

        bundles.AddUrlWithLocalAssets(
            "http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.16/jquery-ui.min.js",
            new LocalAssetSettings
                {
                    Path = "~/Scripts/jquery-ui-1.8.18.custom.min.js",
                    FallbackCondition = "typeof jQuery.ui == 'undefined'",
                }
            );

        bundles.AddUrlWithLocalAssets(
            "http://ajax.aspnetcdn.com/ajax/jquery.validate/1.9/jquery.validate.min.js",
                            new LocalAssetSettings
                            {
                                Path = "~/Scripts/jquery.validate.min.js",
                                FallbackCondition = "typeof jQuery.validator == 'undefined'",
                            }
            );

        bundles.AddUrlWithAlias(
            "http://ajax.aspnetcdn.com/ajax/mvc/3.0/jquery.validate.unobtrusive.min.js",
            "jquery-validate-unobtrusive"
            );

        bundles.AddUrlWithAlias(
            "http://ajax.aspnetcdn.com/ajax/jquery.validate/1.9/localization/messages_ptbr.js",
            "jquery-validate-messagesptbr"
            );

        #endregion

        #region Global

        bundles.Add<StylesheetBundle>("Content", new FileSearch
                                                {
                                                    SearchOption = SearchOption.TopDirectoryOnly,
                                                    Pattern = "*.css",
                                                    Exclude = new Regex("reset-min.css$" +
                                                                        "|_Base.css$")
                                                });
        bundles.Add<ScriptBundle>("Scripts", new FileSearch
                                                    {

                                                        SearchOption = SearchOption.TopDirectoryOnly,
                                                        Pattern = "*.js",
                                                        Exclude = new Regex("IE9.js$" +
                                                                            "|selectivizr-min.js$" +
                                                                            @"|jquery-1.7.1.*\.js$" +
                                                                            @"|jquery-ui.*\.js$" +
                                                                            @"|jquery.validate.*\.js$" +
                                                                            @"|recaptcha_ajax.*\.js$" +
                                                                            @"|jQuery.tmpl.*\.js$" +
                                                                            @"|.*debug.js$" +
                                                                            @"|.*vsdoc.js$" +
                                                                            "|messages_ptbr.js$")
                                                    });

        bundles.Add<StylesheetBundle>("Areas/Admin/Content", new FileSearch
                                                        {
                                                            SearchOption = SearchOption.TopDirectoryOnly,
                                                            Pattern = "*.css"
                                                        });
        bundles.Add<ScriptBundle>("Areas/Admin/Scripts", new FileSearch
                                                    {

                                                        SearchOption = SearchOption.TopDirectoryOnly,
                                                        Pattern = "*.js"
                                                    });

        #endregion

        #region Por página

        bundles.AddPerIndividualFile<ScriptBundle>("Scripts/controllers", null, bundle => bundle.PageLocation = "pagina");
        bundles.AddPerIndividualFile<StylesheetBundle>("Content/controllers", null, bundle => bundle.PageLocation = "pagina");

        bundles.AddPerIndividualFile<ScriptBundle>("Areas/Admin/Scripts/controllers", null, bundle => bundle.PageLocation = "pagina");
        bundles.AddPerIndividualFile<StylesheetBundle>("Areas/Admin/Content/controllers", null, bundle => bundle.PageLocation = "pagina");

        #endregion

        bundles.Add<HtmlTemplateBundle>("HtmlTemplates");
    }
}

Create a free my code stock.com account now.

my code stok.com is a free service, which allows you to save and manage code snippes of any kind and programming language. We provide many advantages for your daily work with code-snippets, also for your teamwork. Give it a try!

Find out more and register now

You can customize the height of iFrame-Codes as needed! You can find more infos in our API Reference for iframe Embeds.