public void Configure(BundleCollection bundles, CassetteSettings settings)
 {
     bundles.Add<StylesheetBundle>("assets/styles");
     bundles.Add<StylesheetBundle>("assets/iestyles", b => b.Condition = "IE 9");
     bundles.AddUrlWithLocalAssets("//ajax.googleapis.com/ajax/libs/jquery/1.6.3/jquery.min.js", new LocalAssetSettings
     {
         Path = "~/assets/scripts/jquery",
         FallbackCondition = "!window.jQuery"
     });
     bundles.AddPerSubDirectory<ScriptBundle>("assets/scripts");
 }
Esempio n. 2
0
 public void Configure(BundleCollection bundles, CassetteSettings settings)
 {
     bundles.Add <StylesheetBundle>("assets/styles");
     bundles.Add <StylesheetBundle>("assets/iestyles", b => b.Condition = "IE 9");
     bundles.AddUrlWithLocalAssets("//ajax.googleapis.com/ajax/libs/jquery/1.6.3/jquery.min.js", new LocalAssetSettings
     {
         Path = "~/assets/scripts/jquery",
         FallbackCondition = "!window.jQuery"
     });
     bundles.AddPerSubDirectory <ScriptBundle>("assets/scripts");
 }
        public void Configure(BundleCollection bundles, CassetteSettings settings)
        {
            bundles.Add<StylesheetBundle>("assets/styles");
            bundles.Add<StylesheetBundle>("assets/iestyles", b => b.Condition = "IE");

            bundles.AddPerSubDirectory<ScriptBundle>("assets/scripts");
            bundles.AddUrlWithLocalAssets(
                "//ajax.googleapis.com/ajax/libs/jquery/1.6.3/jquery.min.js",
                new LocalAssetSettings
                {
                    FallbackCondition = "!window.jQuery",
                    Path =  "assets/scripts/jquery"
                }
            );

            var pluginScripts = new ScriptBundle("plugin/scripts");
            pluginScripts.Processor = new ScriptPipeline();
            pluginScripts.Assets.Add(new ResourceAsset("assets/scripts/plugin/script1.js", GetType().Assembly, pluginScripts));
            pluginScripts.Assets.Add(new ResourceAsset("assets/scripts/plugin/script2.js", GetType().Assembly, pluginScripts));
            pluginScripts.Assets.Add(new ResourceAsset("assets/scripts/plugin/script3.js", GetType().Assembly, pluginScripts));

            bundles.Add(pluginScripts);
        }
Esempio n. 4
0
        public void Configure(BundleCollection bundles, CassetteSettings settings)
        {
            bundles.Add<StylesheetBundle>("Content");
            bundles.Add<ScriptBundle>("Scripts", new FileSearch { SearchOption = SearchOption.TopDirectoryOnly });
            bundles.AddPerIndividualFile<ScriptBundle>("Scripts/Pages");

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

             bundles.AddUrlWithLocalAssets(
                "http://ajax.aspnetcdn.com/ajax/jquery.ui/1.8.17/jquery-ui.min.js",
                new LocalAssetSettings
                    {
                        Path = "Scripts/CDN/jquery-ui-1.8.17.js",
                        FallbackCondition = "!window.jQuery.ui"
                    }
            );

             bundles.AddUrlWithAlias(
                "http://ajax.aspnetcdn.com/ajax/jquery.validate/1.9/jquery.validate.min.js",
                "jquery.validate"
                //new LocalAssetSettings
                //{
                //    Path = "Scripts/CDN/jquery.validate-1.9.js",
                //    FallbackCondition = "!window.jQuery.fn.validate"
                //}
            );

             bundles.AddUrlWithAlias(
                "http://ajax.aspnetcdn.com/ajax/jquery.mobile/1.0/jquery.mobile-1.0.min.js",
                "jquery.mobile"
                //new LocalAssetSettings
                //{
                //    Path = "Scripts/CDN/jquery.mobile-1.0.js",
                //    FallbackCondition = "!window.jQuery"
                //}
            );

            bundles.AddUrlWithAlias(
                "http://ajax.aspnetcdn.com/ajax/mvc/3.0/jquery.unobtrusive-ajax.min.js",
                "jquery.unobtrusive-ajax"
                //new LocalAssetSettings
                //{
                //    Path = "Scripts/CDN/jquery.unobtrusive-ajax.js",
                //    FallbackCondition = "!window.jQuery"
                //}
            );

            bundles.AddUrlWithAlias(
                "http://ajax.aspnetcdn.com/ajax/mvc/3.0/jquery.validate.unobtrusive.min.js",
                "jquery.validate.unobtrusive"
                //new LocalAssetSettings
                //{
                //    Path = "Scripts/CDN/jquery.validate.unobtrusive.js",
                //    FallbackCondition = "!window.jQuery"
                //}
            );

            // bundles.AddUrlWithLocalAssets(
            //    "http://ajax.aspnetcdn.com/ajax/mvc/3.0/MicrosoftMvcAjax.debug.js",
            //    new LocalAssetSettings
            //    {
            //        Path = "Scripts/CDN/MicrosoftMvcAjax.js",
            //        FallbackCondition = "!window.jQuery"
            //    }
            //);
        }