当前位置: 首页>>代码示例>>C#>>正文


C# BundleCollection.AddPerSubDirectory方法代码示例

本文整理汇总了C#中BundleCollection.AddPerSubDirectory方法的典型用法代码示例。如果您正苦于以下问题:C# BundleCollection.AddPerSubDirectory方法的具体用法?C# BundleCollection.AddPerSubDirectory怎么用?C# BundleCollection.AddPerSubDirectory使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在BundleCollection的用法示例。


在下文中一共展示了BundleCollection.AddPerSubDirectory方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Configure

		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()*/);
		}
开发者ID:Stephanvs,项目名称:Hayman.Lighthouse,代码行数:28,代码来源:CassetteConfiguration.cs

示例2: Configure

        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()
            );
        }
开发者ID:prasanths,项目名称:cassette,代码行数:11,代码来源:CassetteConfiguration.cs

示例3: Configure

        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");
        }
开发者ID:ryansroberts,项目名称:cassette,代码行数:15,代码来源:CassetteConfiguration.cs

示例4: Configure

        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.AddPerIndividualFile<StylesheetBundle>("Content");
            //bundles.AddPerIndividualFile<ScriptBundle>("Scripts");

            bundles.Add<ScriptBundle>("Content/app");

            bundles.Add<StylesheetBundle>("Content/assets/css");
            bundles.Add<HtmlTemplateBundle>("Content/assets/templates", bundle => bundle.Processor = new HoganPipeline());
            bundles.AddPerSubDirectory<ScriptBundle>("Content/assets/js");

            bundles.Add<ScriptBundle>("Scripts", new FileSearch { Exclude = new Regex("_references.js|-vsdoc\\.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.
        }
开发者ID:scottccoates,项目名称:BootstrapBackboneMVCFun,代码行数:31,代码来源:CassetteConfiguration.cs

示例5: Configure

        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.AddPerSubDirectory<ScriptBundle>("Scripts");

            // To combine files, try something like this instead:
            bundles.Add<StylesheetBundle>("Content", new FileSearch
                                                         {
                                                             Pattern = "*.css;*.less",
                                                             SearchOption = SearchOption.AllDirectories,
                                                             Exclude = new Regex("base")
                                                         });
            // 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.
        }
开发者ID:gan123,项目名称:RightRecruit,代码行数:27,代码来源:CassetteConfiguration.cs

示例6: Configure

        public void Configure(BundleCollection bundles, CassetteSettings settings)
        {
            // The "Scripts/app" contains the application script we'll be testing with Jasmine.
            // The "Scripts/specs" contains the Jasmine specs. It is treated just like a regular Cassette bundle.

            bundles.AddPerSubDirectory<ScriptBundle>("Scripts");
        }
开发者ID:nlerikheemskerk,项目名称:cassette,代码行数:7,代码来源:CassetteConfiguration.cs

示例7: Configure

		public void Configure(BundleCollection bundles, CassetteSettings settings)
		{
			bundles.AddPerIndividualFile<ScriptBundle>("scripts/pages");
			bundles.AddPerSubDirectory<ScriptBundle>("scripts",
				new ExcludeDirectorySearch("*.js", new[] { "pages" }));

			bundles.Add<StylesheetBundle>("content");
		}
开发者ID:dgg,项目名称:Crowdsource-it.org,代码行数:8,代码来源:CassetteConfiguration.cs

示例8: Configure

        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/")));
        }
开发者ID:stucampbell,项目名称:cassette,代码行数:20,代码来源:CassetteConfiguration.cs

示例9: Configure

 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");
 }
开发者ID:JamesTryand,项目名称:cassette,代码行数:11,代码来源:CassetteConfiguration.cs

示例10: Configure

 public void Configure(BundleCollection bundles, CassetteSettings settings)
 {
     var compiler = new IECoffeeScriptCompiler();
     bundles.AddPerIndividualFile<StylesheetBundle>("Content");
     bundles.AddPerIndividualFile<ScriptBundle>("Scripts",
     new FileSearch { SearchOption = SearchOption.TopDirectoryOnly },
     b => b.Processor = new ScriptPipeline { CoffeeScriptCompiler = compiler });
     bundles.AddPerSubDirectory<ScriptBundle>("Scripts",
         b => b.Processor = new ScriptPipeline
         {
             CoffeeScriptCompiler = compiler
         }, true);
 }
开发者ID:vcsjones,项目名称:Presentations,代码行数:13,代码来源:CassetteConfiguration.cs

示例11: Configure

        public void Configure(BundleCollection bundles, CassetteSettings settings)
        {
            bundles.AddPerSubDirectory<HtmlTemplateBundle>("Public/templates", new FileSearch
                                                                           {
                                                                               Pattern = "*.html",
                                                                               SearchOption =
                                                                                   SearchOption.AllDirectories
                                                                           });

            bundles.AddPerSubDirectory<StylesheetBundle>("Public/css", new FileSearch
                                                                           {
                                                                               Pattern = "*.css",
                                                                               SearchOption =
                                                                                   SearchOption.AllDirectories
                                                                           });

            bundles.AddPerSubDirectory<ScriptBundle>("Public/js", new FileSearch
                                                                      {
                                                                          Pattern = "*.js;*.coffee",
                                                                          SearchOption = SearchOption.AllDirectories,
                                                                          Exclude = new Regex("-vsdoc\\.js$")
                                                                      });
        }
开发者ID:kibiluzbad,项目名称:Ogum,代码行数:23,代码来源:CassetteConfiguration.cs

示例12: Configure

        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.
        }
开发者ID:jasondentler,项目名称:kelli,代码行数:22,代码来源:CassetteConfiguration.cs

示例13: Configure

        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);
        }
开发者ID:bittercoder,项目名称:cassette,代码行数:23,代码来源:CassetteConfiguration.cs

示例14: Configure

 public void Configure(BundleCollection bundles, CassetteSettings settings)
 {
     bundles.AddPerSubDirectory<StylesheetBundle>("Content", excludeTopLevel: true);
     bundles.AddPerSubDirectory<ScriptBundle>("Scripts");
 }
开发者ID:PolishDev,项目名称:shop-manager,代码行数:5,代码来源:CassetteConfiguration.cs

示例15: Configure

 public void Configure(BundleCollection bundles, CassetteSettings settings)
 {
   bundles.Add<StylesheetBundle>("Styles");
   bundles.AddPerSubDirectory<ScriptBundle>("Scripts");
 }
开发者ID:terjetyl,项目名称:Cassette.Nancy,代码行数:5,代码来源:CassetteConfiguration.cs


注:本文中的BundleCollection.AddPerSubDirectory方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。