public void Configure(BundleCollection bundles, CassetteSettings settings)
		{
			// Stylesheets
			bundles.AddUrlWithAlias<StylesheetBundle>("http://fonts.googleapis.com/css?family=PT+Sans", "font-ptsans");
			bundles.AddUrlWithAlias<StylesheetBundle>("http://fonts.googleapis.com/css?family=Ubuntu:300,400,500,700,300italic,400italic,500italic,700italic", "font-ubuntu");
			bundles.AddUrlWithAlias<StylesheetBundle>("http://fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,700italic,800italic,400,600,700,800,300", "font-opensans");
			bundles.AddPerSubDirectory<StylesheetBundle>("Styles", new FileSearch { Pattern = "*.css;*.less" });

			// Scripts
			bundles.AddPerSubDirectory<ScriptBundle>("Scripts", new FileSearch
			{
			    Pattern = "*.js;*.coffee",
				Exclude = new Regex("-vsdoc\\.js$"), // Excludes the VS documentation files
				SearchOption = SearchOption.AllDirectories
			});

			// HtmlTemplates
			bundles.Add<HtmlTemplateBundle>(
				"Views/Templates",
				new FileSearch 
				{
					Pattern = "*.htm;*.html",
					SearchOption = SearchOption.AllDirectories
				}
				/*,
				// Assign the jQuery-tmpl processor to the HTML template bundles
				bundle => bundle.Processor = new KnockoutJQueryTmplPipeline()*/);
		}
Пример #2
0
        public void Configure(BundleCollection bundles, CassetteSettings settings)
        {
            // TODO: Configure your bundles here...
            // Please read http://getcassette.net/documentation/configuration

            // This default configuration treats each file as a separate 'bundle'.
            // In production the content will be minified, but the files are not combined.
            // So you probably want to tweak these defaults!
            bundles.Add<StylesheetBundle>("assets/css");
            bundles.Add<ScriptBundle>("assets/js");

            bundles.AddUrlWithAlias<ScriptBundle>("https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js", "jquery");
            bundles.AddUrlWithAlias<ScriptBundle>("https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.18/jquery-ui.min.js", "jquery-ui");
            bundles.AddUrlWithAlias<ScriptBundle>("http://ajax.aspnetcdn.com/ajax/knockout/knockout-2.1.0.js", "knockout");

            //<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
            //<script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.18/jquery-ui.min.js"></script>
            //<script src="http://ajax.aspnetcdn.com/ajax/knockout/knockout-2.1.0.js"></script>

            // To combine files, try something like this instead:
            //   bundles.Add<StylesheetBundle>("Content");
            // In production mode, all of ~/Content will be combined into a single bundle.

            // If you want a bundle per folder, try this:
            //   bundles.AddPerSubDirectory<ScriptBundle>("Scripts");
            // Each immediate sub-directory of ~/Scripts will be combined into its own bundle.
            // This is useful when there are lots of scripts for different areas of the website.

            // *** TOP TIP: Delete all ".min.js" files now ***
            // Cassette minifies scripts for you. So those files are never used.
        }
Пример #3
0
        public void Configure(BundleCollection bundles, CassetteSettings settings)
        {
            bundles.Add <StylesheetBundle>("Styles");
            bundles.AddPerSubDirectory <ScriptBundle>("Scripts");
            bundles.AddUrlWithAlias("http://platform.twitter.com/widgets.js", "twitter", b => b.PageLocation = "body");

            bundles.AddPerSubDirectory <HtmlTemplateBundle>(
                "HtmlTemplates",
                bundle => bundle.Processor = new HtmlTemplatePipeline()
                );
        }
Пример #4
0
        public void Configure(BundleCollection bundles, CassetteSettings settings)
        {
            bundles.Add<StylesheetBundle>("Styles");
            bundles.AddPerSubDirectory<ScriptBundle>("Scripts");
            bundles.AddUrlWithAlias("http://platform.twitter.com/widgets.js", "twitter", b => b.PageLocation = "body");

            bundles.AddPerSubDirectory<HtmlTemplateBundle>(
                "HtmlTemplates",
                bundle => bundle.Processor = new HtmlTemplatePipeline()
            );
        }
        public void Configure(BundleCollection bundles, CassetteSettings settings)
        {
            bundles.AddPerSubDirectory<ScriptBundle>("Scripts");
            bundles.AddUrlWithAlias(
                "http://platform.twitter.com/widgets.js",
                "twitter",
                b =>
                {
                    b.PageLocation = "body";
                    b.HtmlAttributes.Add(new { async = "async" });
                });

            bundles.AddPerSubDirectory<HtmlTemplateBundle>("HtmlTemplates");
            bundles.Add<StylesheetBundle>("Styles");
        }
Пример #6
0
        public void Configure(BundleCollection bundles, CassetteSettings settings)
        {
            settings.IsDebuggingEnabled = false;

            bundles.AddPerSubDirectory <ScriptBundle>("Scripts");
            bundles.AddUrlWithAlias(
                "http://platform.twitter.com/widgets.js",
                "twitter",
                b =>
            {
                b.PageLocation = "body";
                b.HtmlAttributes.Add(new { async = "async" });
            });

            bundles.AddPerSubDirectory <HtmlTemplateBundle>("HtmlTemplates");
            bundles.Add <StylesheetBundle>("Styles");
        }
        public void Configure(BundleCollection bundles, CassetteSettings settings)
        {
            // Enable compilation of LESS files:
            settings.SetDefaultBundleProcessor(new StylesheetPipeline().CompileLess());

            bundles.AddPerSubDirectory<ScriptBundle>("Scripts");
            bundles.AddUrlWithAlias(
                "http://platform.twitter.com/widgets.js",
                "twitter",
                b =>
                {
                    b.PageLocation = "body";
                    b.HtmlAttributes.Add(new { async = "async" });
                });

            bundles.AddPerSubDirectory<HtmlTemplateBundle>("HtmlTemplates");
            bundles.Add<StylesheetBundle>("Styles");
        }
Пример #8
0
        public void Configure(BundleCollection bundles, CassetteSettings settings)
        {
            // Enable compilation of LESS files:
            settings.SetDefaultBundleProcessor(new StylesheetPipeline().CompileLess());

            bundles.AddPerSubDirectory <ScriptBundle>("Scripts");
            bundles.AddUrlWithAlias(
                "http://platform.twitter.com/widgets.js",
                "twitter",
                b =>
            {
                b.PageLocation = "body";
                b.HtmlAttributes.Add(new { async = "async" });
            });

            bundles.AddPerSubDirectory <HtmlTemplateBundle>("HtmlTemplates");
            bundles.Add <StylesheetBundle>("Styles");
        }
Пример #9
0
        public void Configure(BundleCollection bundles, CassetteSettings settings)
        {
            bundles.AddPerSubDirectory<ScriptBundle>("Scripts");
            bundles.AddUrlWithAlias(
                "http://platform.twitter.com/widgets.js",
                "twitter",
                b => { b.PageLocation = "body"; b.HtmlAttributes.Add(new { async = "async" }); });

            bundles.AddPerSubDirectory<HtmlTemplateBundle>(
                "HtmlTemplates",
                bundle => bundle.Processor = new HoganPipeline()
                {
                    Namespace = "templates"
                }
            );

            bundles.Add<StylesheetBundle>("Styles", b => b.Processor = new StylesheetPipeline()
                .EmbedImages(whitelistPath => whitelistPath.Contains("/embed/"))
                .EmbedFonts(whitelistPath => whitelistPath.Contains("/embed/")));
        }
Пример #10
0
        public void Configure(BundleCollection bundles, CassetteSettings settings)
        {
            // TODO: Configure your bundles here...
            // Please read http://getcassette.net/documentation/configuration

            bundles.AddPerIndividualFile<StylesheetBundle>("Content");
            bundles.AddPerSubDirectory<ScriptBundle>("Scripts");

            bundles.AddUrlWithAlias<ScriptBundle>("/signalr/hubs", "signalr", b => b.AddReference("~/Scripts/lib/jquery.signalR.js"));

            // To combine files, try something like this instead:
            //   bundles.Add<StylesheetBundle>("Content");
            // In production mode, all of ~/Content will be combined into a single bundle.

            // If you want a bundle per folder, try this:
            //   bundles.AddPerSubDirectory<ScriptBundle>("Scripts");
            // Each immediate sub-directory of ~/Scripts will be combined into its own bundle.
            // This is useful when there are lots of scripts for different areas of the website.

            // *** TOP TIP: Delete all ".min.js" files now ***
            // Cassette minifies scripts for you. So those files are never used.
        }
 public void Configure(BundleCollection bundles, CassetteSettings settings)
 {
     bundles.AddPerSubDirectory<StylesheetBundle>("Content");
     bundles.AddPerSubDirectory<ScriptBundle>("Scripts");
     bundles.AddUrlWithAlias<ScriptBundle>("/signalr/hubs", "~/signalr", bundle => bundle.AddReference("~/Scripts/lib/"));
 }
Пример #12
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"
            //    }
            //);
        }