Esempio n. 1
0
        public void Configure(BundleCollection bundles, CassetteSettings settings)
        {
            bundles.Add<StylesheetBundle>(@"Content\lib", new FileSearch
                                                              {
                                                                  Pattern = "*.css;*.less",
                                                                  SearchOption = SearchOption.AllDirectories
                                                              });
            bundles.AddPerIndividualFile<StylesheetBundle>(@"Content\Views",
                                                           new FileSearch
                                                               {
                                                                   Pattern = "*.css;*.less",
                                                                   SearchOption = SearchOption.AllDirectories
                                                               });

            bundles.Add<ScriptBundle>(@"Scripts\lib", new FileSearch
                                                          {
                                                              Pattern = "*.js;*.coffee",
                                                              Exclude = new Regex("-vsdoc\\.js$"),
                                                              SearchOption = SearchOption.AllDirectories
                                                          });
            bundles.AddPerIndividualFile<ScriptBundle>(@"Scripts\Views", new FileSearch
                                                                             {
                                                                                 Pattern = "*.js;*.coffee",
                                                                                 Exclude = new Regex("-vsdoc\\.js$"),
                                                                                 SearchOption = SearchOption.AllDirectories
                                                                             });
        }
 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);
 }
        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", null, x =>
            //    {
            //        //x.Processor = new CommonJSScriptPipeline();
            //    });
            bundles.Add<ScriptBundle>("Scripts/internal", b => b.Processor = new ScriptPipeline().InsertBefore<SortAssetsByDependency>(new StitchProcessor()));

            settings.IsDebuggingEnabled = true;
            //settings.UrlModifier = new FileExtensionUrlModifier();

            // 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.
        }
Esempio n. 4
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.AddPerIndividualFile <StylesheetBundle>("Content");
            //bundles.AddPerIndividualFile<ScriptBundle>("Scripts", null, x =>
            //    {
            //        //x.Processor = new CommonJSScriptPipeline();
            //    });
            bundles.Add <ScriptBundle>("Scripts/internal", b => b.Processor = new ScriptPipeline().InsertBefore <SortAssetsByDependency>(new StitchProcessor()));

            settings.IsDebuggingEnabled = true;
            //settings.UrlModifier = new FileExtensionUrlModifier();

            // 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.AddPerIndividualFile<ScriptBundle>("scripts/pages");
			bundles.AddPerSubDirectory<ScriptBundle>("scripts",
				new ExcludeDirectorySearch("*.js", new[] { "pages" }));

			bundles.Add<StylesheetBundle>("content");
		}
Esempio n. 6
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.AddPerIndividualFile<StylesheetBundle>("Content");
            bundles.AddPerIndividualFile <ScriptBundle>("Scripts");
            bundles.AddPerIndividualFile <ScriptBundle>("Areas/Admin/Content");
            bundles.AddPerIndividualFile <ScriptBundle>("Areas/Admin/Scripts");

            bundles.Add <StylesheetBundle>("Content/bootstrap.css");
            bundles.Add <StylesheetBundle>("Content/bootstrap-responsive.css");
            bundles.Add <StylesheetBundle>("Content/css/jquery-autocomplete.css");

            bundles.Add <StylesheetBundle>("Areas/Admin/Content/css/bootstrap.css");
            bundles.Add <StylesheetBundle>("Areas/Admin/Content/css/combine_fonts.css");
            bundles.Add <StylesheetBundle>("Areas/Admin/Content/plugins/datepicker/css/datepicker.css");
            bundles.Add <StylesheetBundle>("Areas/Admin/Content/plugins/colorpicker/css/colorpicker.css");
            bundles.Add <StylesheetBundle>("Areas/Admin/Content/plugins/wysiwyg/bootstrap-wysihtml5.css");
            bundles.Add <StylesheetBundle>("Areas/Admin/Content/plugins/plupload/js/jquery.plupload.queue/css/jquery.plupload.queue.css");
            bundles.Add <StylesheetBundle>("Areas/Admin/Content/css/buttons.css");
            bundles.Add <StylesheetBundle>("Areas/Admin/Content/css/style.css");
            bundles.Add <StylesheetBundle>("Areas/Admin/Content/css/dark.css");
            bundles.Add <StylesheetBundle>("Areas/Admin/Content/css/cms.css");
            bundles.Add <StylesheetBundle>("Areas/Admin/Content/css/bootstrap-responsive.css");

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

            bundles.Add<StylesheetBundle>("Content/bootstrap.css");
            bundles.Add<StylesheetBundle>("Content/bootstrap-responsive.css");
            bundles.Add<StylesheetBundle>("Content/css/jquery-autocomplete.css");

            bundles.Add<StylesheetBundle>("Areas/Admin/Content/css/bootstrap.css");
            bundles.Add<StylesheetBundle>("Areas/Admin/Content/css/combine_fonts.css");
            bundles.Add<StylesheetBundle>("Areas/Admin/Content/plugins/datepicker/css/datepicker.css");
            bundles.Add<StylesheetBundle>("Areas/Admin/Content/plugins/colorpicker/css/colorpicker.css");
            bundles.Add<StylesheetBundle>("Areas/Admin/Content/plugins/wysiwyg/bootstrap-wysihtml5.css");
            bundles.Add<StylesheetBundle>("Areas/Admin/Content/plugins/plupload/js/jquery.plupload.queue/css/jquery.plupload.queue.css");
            bundles.Add<StylesheetBundle>("Areas/Admin/Content/css/buttons.css");
            bundles.Add<StylesheetBundle>("Areas/Admin/Content/css/style.css");
            bundles.Add<StylesheetBundle>("Areas/Admin/Content/css/dark.css");
            bundles.Add<StylesheetBundle>("Areas/Admin/Content/css/cms.css");
            bundles.Add<StylesheetBundle>("Areas/Admin/Content/css/bootstrap-responsive.css");

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

            // 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)
        {
            // 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)
        {
            // bootstrap
            //bundles.Add<StylesheetBundle>("~/styles/libs/bootstrap/bootstrap.less");

            // styles (which call bootstrap)
            bundles.Add<StylesheetBundle>("styles",new [] {"~/styles/libs/bootstrap/bootstrap.less", "~/styles/site.less"});

            // libraries (jQuery)
            bundles.Add<ScriptBundle>("scripts/libs");

            // modernizr
            bundles.Add<ScriptBundle>("scripts/header",
                b => b.PageLocation = "head");

            // common scripts
            bundles.Add<ScriptBundle>("scripts",
                new FileSearch { SearchOption = SearchOption.TopDirectoryOnly },
                b => b.Processor = new ScriptPipeline() { CoffeeScriptCompiler = new IECoffeeScriptCompiler()});

            bundles.AddPerIndividualFile<ScriptBundle>("scripts/pages",
                null,
                b => b.Processor = new ScriptPipeline { CoffeeScriptCompiler = new IECoffeeScriptCompiler() });
        }
 public void Configure(BundleCollection bundles, CassetteSettings settings)
 {
     bundles.AddPerIndividualFile<ScriptBundle>(@"Scripts");
     bundles.AddPerIndividualFile<StylesheetBundle>(@"Content");
 }
Esempio n. 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"
            //    }
            //);
        }