Пример #1
3
        public string Build(BundleType type, IEnumerable<string> files)
        {
            if (files == null || !files.Any())
                return string.Empty;

            string bundleVirtualPath = this.GetBundleVirtualPath(type, files);
            var bundleFor = BundleTable.Bundles.GetBundleFor(bundleVirtualPath);
            if (bundleFor == null)
            {
                lock (s_lock)
                {
                    bundleFor = BundleTable.Bundles.GetBundleFor(bundleVirtualPath);
                    if (bundleFor == null)
                    {
                        var nullOrderer = new NullOrderer();

                        Bundle bundle = (type == BundleType.Script) ?
                            new CustomScriptBundle(bundleVirtualPath) as Bundle :
                            new SmartStyleBundle(bundleVirtualPath) as Bundle;
                        bundle.Orderer = nullOrderer;

                        bundle.Include(files.ToArray());

                        BundleTable.Bundles.Add(bundle);
                    }
                }
            }

            if (type == BundleType.Script)
                return Scripts.Render(bundleVirtualPath).ToString();

            return Styles.Render(bundleVirtualPath).ToString();
        }
Пример #2
0
        // For more information on bundling, visit http://go.microsoft.com/fwlink/?LinkId=301862
        public static void RegisterBundles(BundleCollection bundles)
        {

#if !DEBUG
            BundleTable.EnableOptimizations = true;
#endif
            var nullBuilder = new NullBuilder();
            var styleTransformer = new StyleTransformer();
            var nullOrderer = new NullOrderer();

            // 
            // CUSTOM
            //

            var sb = new ScriptBundle("~/bundles/scripts");
            sb.IncludeDirectory("~/assets/js/", "*.js", true);

            bundles.Add(sb);

            var styleBundle = new Bundle("~/bundles/styles");
            styleBundle.IncludeDirectory("~/assets/style/", "*.css", true);
            styleBundle.IncludeDirectory("~/assets/style/", "*.less", true);

            styleBundle.Builder = nullBuilder;
            styleBundle.Transforms.Add(styleTransformer);
            styleBundle.Orderer = nullOrderer;
            bundles.Add(styleBundle);
        }
        public static void RegisterBundles(BundleCollection bundles)
        {
            var cssTransformer = new CssTransformer();
            var jsTransformer = new JsTransformer();
            var nullOrderer = new NullOrderer();

            bundles.Add(new ScriptBundle("~/content/js").Include(
                "~/Scripts/jquery-{version}.js",
                "~/Scripts/jquery-migrate-{version}.js",
                "~/Content/vendor/bootstrap/js/bootstrap.js",
                "~/Scripts/jquery.validate.js",
                "~/scripts/jquery.validate.unobtrusive.js",
                "~/Scripts/jquery.validate.unobtrusive-custom-for-bootstrap.js"
                ));

            bundles.Add(new ScriptBundle("~/scripts/modernizr").Include(
                "~/Scripts/modernizr-{version}.js"
                ));

            bundles.Add(new StyleBundle("~/content/css").Include(
                "~/Content/vendor/bootstrap/css/bootstrap.css",
                "~/Content/vendor/bootstrap/css/bootstrap-mvc-validation.css"
                ));

            var lessBundle = new Bundle("~/content/less").Include("~/Content/less/ciauth.less");
            lessBundle.Transforms.Add(cssTransformer);
            lessBundle.Orderer = nullOrderer;

            bundles.Add(lessBundle);

              //      BundleTable.EnableOptimizations = true;
        }
Пример #4
0
		public static void RegisterBundles(BundleCollection bundles)
		{
			bundles.UseCdn = true;

			var nullOrderer = new NullOrderer();

			var commonStylesBundle = new CustomStyleBundle("~/Bundles/CommonStyles");
			commonStylesBundle.Include("~/Content/app.less");
			commonStylesBundle.Orderer = nullOrderer;

			bundles.Add(commonStylesBundle);

			var modernizrBundle = new CustomScriptBundle("~/Bundles/Modernizr");
			modernizrBundle.Include("~/Scripts/modernizr-2.*");
			modernizrBundle.Orderer = nullOrderer;

			bundles.Add(modernizrBundle);

			var jQueryBundle = new CustomScriptBundle("~/Bundles/Jquery",
				"http://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.10.2.min.js");
			jQueryBundle.Include("~/Scripts/jquery-{version}.js");
			jQueryBundle.Orderer = nullOrderer;
			jQueryBundle.CdnFallbackExpression = "window.jquery";

			bundles.Add(jQueryBundle);

			var commonScriptsBundle = new CustomScriptBundle("~/Bundles/CommonScripts");
			commonScriptsBundle.Include("~/Scripts/bootstrap.js");
			commonScriptsBundle.Orderer = nullOrderer;

			bundles.Add(commonScriptsBundle);
		}
Пример #5
0
        public static void RegisterBundles(BundleCollection bundles)
        {
            bundles.UseCdn = true;

            var nullOrderer = new NullOrderer();

            // Replace a default bundle resolver in order to the debugging HTTP-handler can use
            // transformations of the corresponding bundle
            BundleResolver.Current = new CustomBundleResolver();

            var commonStylesBundle = new CustomStyleBundle("~/Bundles/CommonStyles");
            commonStylesBundle.Include(
                "~/Css/bootstrap5152.css",
                "~/Css/responsive5152.css",
                "~/Js/prettyphoto/prettyPhotoaeb9.css",
                "~/Css/main5152.css");
            commonStylesBundle.Orderer = nullOrderer;
            bundles.Add(commonStylesBundle);

            var commonScriptsBundle = new CustomScriptBundle("~/Bundles/CommonScripts");
            commonScriptsBundle.Include(
                "~/Js/jquery-1.8.3.min.js",
                "~/Js/jquery.easing.1.3.min.js",
                "~/Js/prettyphoto/jquery.prettyPhoto.min.js",
                "~/Js/jflickrfeed.min.js",
                "~/Js/jquery.liveSearch.min.js",
                "~/Js/jquery.form.min.js",
                "~/Js/custom.min.js");

            commonScriptsBundle.Orderer = nullOrderer;
            bundles.Add(commonScriptsBundle);
        }
        public static void RegisterBundles(BundleCollection bundles)
        {
            bundles.UseCdn = true;

            var nullBuilder = new NullBuilder();
            var cssTransformer = new CssTransformer();
            var jsTransformer = new JsTransformer();
            var nullOrderer = new NullOrderer();

            /*Common Styles */
            var commonStylesBundle = new Bundle("~/Bundles/CommonStyles");
            commonStylesBundle.Include("~/Content/bootstrap.css");
            commonStylesBundle.Builder = nullBuilder;
            commonStylesBundle.Transforms.Add(cssTransformer);
            commonStylesBundle.Orderer = nullOrderer;

            bundles.Add(commonStylesBundle);

            /*App Css */
            var appStylesBundle = new Bundle("~/Bundles/AppStyles");
            appStylesBundle.Include(
                "~/App/css/base.css",
                "~/App/css/custom.css");
            appStylesBundle.Builder = nullBuilder;
            appStylesBundle.Transforms.Add(cssTransformer);
            appStylesBundle.Orderer = nullOrderer;

            bundles.Add(appStylesBundle);
        }
Пример #7
0
        // For more information on Bundling, visit http://go.microsoft.com/fwlink/?LinkId=254725
        public static void RegisterBundles(BundleCollection bundles)
        {
            //bundles.UseCdn = true;
            var nullBuilder = new NullBuilder();
            var cssTransformer = new StyleTransformer();
            var jsTransformer = new ScriptTransformer();
            var nullOrderer = new NullOrderer();

            // JavaScript

            // jQuery
            var jquery = new Bundle("~/bundles/jquery").Include(
                "~/Scripts/jquery-{version}.js");
            jquery.Builder = nullBuilder;
            jquery.Transforms.Add(jsTransformer);
            jquery.Orderer = nullOrderer;

            bundles.Add(jquery);

            // Modernizr
            var modernizr = new Bundle("~/bundles/modernizr").Include(
                "~/Scripts/modernizr-2.6.2.js");
            modernizr.Builder = nullBuilder;
            modernizr.Transforms.Add(jsTransformer);
            modernizr.Orderer = nullOrderer;

            bundles.Add(modernizr);

            // Scripts
            var js = new Bundle("~/bundles/js").Include(
                "~/Scripts/bootstrap.min.js",
                "~/Scripts/app.js");
            js.Builder = nullBuilder;
            js.Transforms.Add(jsTransformer);
            js.Orderer = nullOrderer;

            bundles.Add(js);

            // POST: Validation
            var jqueryVal = new Bundle("~/bundles/jqueryval").Include(
                "~/Scripts/jquery.validate.unobtrusive.min.js",
                "~/Scripts/jquery.validate.min.js");
            jqueryVal.Builder = nullBuilder;
            jqueryVal.Transforms.Add(jsTransformer);
            jqueryVal.Orderer = nullOrderer;

            bundles.Add(jqueryVal);

            // Styles
            var css = new Bundle("~/bundles/css").Include(
                "~/Content/bootstrap/bootstrap.less");
            css.Builder = nullBuilder;
            css.Transforms.Add(cssTransformer);
            css.Transforms.Add(new CssMinify());
            css.Orderer = nullOrderer;

            bundles.Add(css);

            //BundleTable.EnableOptimizations = true;
        }
Пример #8
0
        public static void RegisterBundles(BundleCollection bundles)
        {
            #if !RELEASE
            BundleTable.EnableOptimizations = false;
            #else
            BundleTable.EnableOptimizations = true;
            #endif

            var cssTransformer = new CssTransformer();
            var nullOrderer = new NullOrderer();

            // can mix less, sass and css together
            var sytleBundle = new Bundle("~/styles", cssTransformer).Include(
                "~/Content/body.css",
                "~/Content/site.less");

            sytleBundle.Orderer = nullOrderer;

            bundles.Add(sytleBundle);

            bundles.Add(new ScriptBundle("~/js").Include(
                "~/Scripts/jquery-1.*",
                "~/Scripts/json2.js",
                "~/Scripts/bootstrap.js",
                "~/Scripts/underscore.js",
                "~/Scripts/knockout-{version}.debug.js",
                "~/Scripts/underscore-ko-{version}.js",
                "~/Scripts/jquery.signalR-{version}.js"
                //"~/Scripts/jquery.validate.js",
                //"~/scripts/jquery.validate.unobtrusive.js",
                //"~/Scripts/jquery.validate.unobtrusive-custom-for-bootstrap.js"
                ));
        }
Пример #9
0
        // For more information on bundling, visit http://go.microsoft.com/fwlink/?LinkId=301862
        public static void RegisterBundles(BundleCollection bundles)
        {
            BundleTable.EnableOptimizations = false;

            bundles.UseCdn = true;
            var cssTransformer = new CssTransformer();
            var jsTransformer = new JsTransformer();
            var nullOrderer = new NullOrderer();

            var cssBundle = new CustomStyleBundle("~/bundles/css");
            cssBundle.Include("~/Content/Site.less", "~/Content/bootstrap/bootstrap.less");
            cssBundle.Transforms.Add(cssTransformer);
            cssBundle.Orderer = nullOrderer;
            bundles.Add(cssBundle);

            var jqueryBundle = new CustomScriptBundle("~/bundles/jquery");
            jqueryBundle.Include("~/Scripts/jquery-{version}.js");
            jqueryBundle.Transforms.Add(jsTransformer);
            jqueryBundle.Orderer = nullOrderer;
            bundles.Add(jqueryBundle);

            var jqueryvalBundle = new CustomScriptBundle("~/bundles/jqueryval");
            jqueryvalBundle.Include("~/Scripts/jquery.validate*");
            jqueryvalBundle.Transforms.Add(jsTransformer);
            jqueryvalBundle.Orderer = nullOrderer;
            bundles.Add(jqueryvalBundle);

            // Use the development version of Modernizr to develop with and learn from. Then, when you're
            // ready for production, use the build tool at http://modernizr.com to pick only the tests you need.

            var modernizrBundle = new CustomScriptBundle("~/bundles/modernizr");
            modernizrBundle.Include("~/Scripts/modernizr-*");
            modernizrBundle.Transforms.Add(jsTransformer);
            modernizrBundle.Orderer = nullOrderer;
            bundles.Add(modernizrBundle);

            var bootstrapBundle = new CustomScriptBundle("~/bundles/bootstrap");
            bootstrapBundle.Include("~/Scripts/bootstrap.js", "~/Scripts/respond.js");
            bootstrapBundle.Transforms.Add(jsTransformer);
            bootstrapBundle.Orderer = nullOrderer;
            bundles.Add(bootstrapBundle);

            var requireBundle = new CustomScriptBundle("~/bundles/requirejs");
            requireBundle.Include("~/Scripts/require.js");
            requireBundle.Transforms.Add(jsTransformer);
            requireBundle.Orderer = nullOrderer;
            bundles.Add(requireBundle);

            var json2Bundle = new CustomScriptBundle("~/bundles/json2");
            json2Bundle.Include("~/Scripts/json2.js");
            json2Bundle.Transforms.Add(jsTransformer);
            json2Bundle.Orderer = nullOrderer;
            bundles.Add(json2Bundle);

            var marionetteBundle = new CustomScriptBundle("~/bundles/marionette");
            marionetteBundle.Include("~/Scripts/underscore.js", "~/Scripts/backbone.js", "~/Scripts/backbone.marionette.js");
            marionetteBundle.Transforms.Add(jsTransformer);
            marionetteBundle.Orderer = nullOrderer;
            bundles.Add(marionetteBundle);
        }
Пример #10
0
        public static void RegisterBundles(BundleCollection bundles)
        {
            var cssTransformer = new CssTransformer();
            var jsTransformer = new JsTransformer();
            var nullOrderer = new NullOrderer();

            var commonStylesBundle = new Bundle("~/Bundles/CommonStyles");
            commonStylesBundle.Include(
               "~/Content/less/bootstrap.less",
               "~/Content/less/responsive.less");
            commonStylesBundle.Transforms.Add(cssTransformer);
            commonStylesBundle.Orderer = nullOrderer;

            bundles.Add(commonStylesBundle);

            var commonScriptsBundle = new Bundle("~/Bundles/CommonScripts");
            commonScriptsBundle.Include(
               "~/Scripts/jquery-{version}.js",
               "~/Scripts/less.min.js",
               "~/Scripts/bootstrap.js",
               "~/Scripts/angular.js",
               "~/Scripts/linq.js");
            commonScriptsBundle.Transforms.Add(jsTransformer);
            commonScriptsBundle.Orderer = nullOrderer;

            bundles.Add(commonScriptsBundle);
        }
Пример #11
0
        public static void RegisterBundles(BundleCollection bundles)
        {
            var cssTransformer = new CssTransformer();
            var jsTransformer = new JsTransformer();
            var nullOrderer = new NullOrderer();

            var js = new ScriptBundle("~/bundles/js").Include(
                 "~/Scripts/jquery-{version}.js",
                "~/Scripts/bootstrap.js",
                "~/Scripts/less.min.js",
                "~/Scripts/moment.js",
                "~/Scripts/main.js",
                "~/Scripts/jquery.quick.pagination.min.js",
                "~/Scripts/bootstrap-fileupload.min.js"
                );

            js.Transforms.Add(jsTransformer);
            js.Orderer = nullOrderer;

            bundles.Add(js);

            var css = new StyleBundle("~/bundles/css").Include(
                 "~/Content/less/bootstrap.less",
                "~/Content/styles.css",
                "~/Content/custom.css",
                "~/Content/bootstrap-fileupload.min.css"
                );
            css.Transforms.Add(cssTransformer);
            css.Orderer = nullOrderer;

            bundles.Add(css);
        }
        public static void RegisterBundles(BundleCollection bundles)
        {
            var cssTransformer = new StyleTransformer();
            var jsTransformer = new ScriptTransformer();
            var nullOrderer = new NullOrderer();

            var css = new Bundle("~/bootstrap/css").Include(
                "~/Content/bootstrap/bootstrap.less");

            css.Transforms.Add(cssTransformer);
            css.Orderer = nullOrderer;

            bundles.Add(css);

            var jquery = new Bundle("~/bundles/jquery").Include(
                            "~/Scripts/jquery-{version}.js",
                            "~/Scripts/modernizr-{version}.js",
                            "~/Scripts/bootstrap.min.js"
                            );

            jquery.Transforms.Add(jsTransformer);
            jquery.Orderer = nullOrderer;

            bundles.Add(jquery);

            BundleTable.EnableOptimizations = true;
        }
Пример #13
0
        // For more information on bundling, visit http://go.microsoft.com/fwlink/?LinkId=301862
        public static void RegisterBundles(BundleCollection bundles)
        {
            bundles.UseCdn = true;
            var cssTransformer = new StyleTransformer();
            var jsTransformer = new ScriptTransformer();
            var nullOrderer = new NullOrderer();

            var cssBundle = new StyleBundle("~/bundles/css");
            cssBundle.Include("~/Content/Site.less", "~/Content/bootstrap/bootstrap.less");
            cssBundle.Transforms.Add(cssTransformer);
            cssBundle.Orderer = nullOrderer;
            bundles.Add(cssBundle);

            var commonBundle = new ScriptBundle("~/bundles/common");
            commonBundle.Include("~/Scripts/jquery-{version}.js")
                        .Include("~/Scripts/jquery.validate*")
                        .Include("~/Scripts/modernizr-*")
                        .Include("~/Scripts/respond.js")
                        .Include("~/Scripts/knockout-{version}.js");
            commonBundle.Transforms.Add(jsTransformer);
            commonBundle.Orderer = nullOrderer;
            bundles.Add(commonBundle);

            //var jqueryBundle = new ScriptBundle("~/bundles/jquery");
            //jqueryBundle.Include("~/Scripts/jquery-{version}.js");
            //jqueryBundle.Transforms.Add(jsTransformer);
            //jqueryBundle.Orderer = nullOrderer;
            //bundles.Add(jqueryBundle);

            //var jqueryvalBundle = new ScriptBundle("~/bundles/jqueryval");
            //jqueryvalBundle.Include("~/Scripts/jquery.validate*");
            //jqueryvalBundle.Transforms.Add(jsTransformer);
            //jqueryvalBundle.Orderer = nullOrderer;
            //bundles.Add(jqueryvalBundle);

            //// Use the development version of Modernizr to develop with and learn from. Then, when you're
            //// ready for production, use the build tool at http://modernizr.com to pick only the tests you need.

            //var modernizrBundle = new ScriptBundle("~/bundles/modernizr");
            //modernizrBundle.Include("~/Scripts/modernizr-*");
            //modernizrBundle.Transforms.Add(jsTransformer);
            //modernizrBundle.Orderer = nullOrderer;
            //bundles.Add(modernizrBundle);

            //var bootstrapBundle = new ScriptBundle("~/bundles/bootstrap");
            //bootstrapBundle.Include("~/Scripts/bootstrap.js", "~/Scripts/respond.js");
            //bootstrapBundle.Transforms.Add(jsTransformer);
            //bootstrapBundle.Orderer = nullOrderer;
            //bundles.Add(bootstrapBundle);

            //var knockoutBundle = new ScriptBundle("~/bundles/knockout");
            //knockoutBundle.Include("~/Scripts/knockout-{version}.js");
            //knockoutBundle.Transforms.Add(jsTransformer);
            //knockoutBundle.Orderer = nullOrderer;
            //bundles.Add(knockoutBundle);
        }
Пример #14
0
        // For more information on bundling, visit http://go.microsoft.com/fwlink/?LinkId=301862
        public static void RegisterBundles(BundleCollection bundles)
        {
            /*
              * Styles
              */
            bundles.Add(new StyleBundle("~/bundles/foundation/style").Include(
                "~/Content/Styles/foundation/foundation.css"));

            bundles.Add(new StyleBundle("~/bundles/themes/base/css").Include(
                "~/Content/themes/base/jquery.ui.core.css",
                "~/Content/themes/base/jquery.ui.resizable.css",
                "~/Content/themes/base/jquery.ui.selectable.css",
                "~/Content/themes/base/jquery.ui.accordion.css",
                "~/Content/themes/base/jquery.ui.autocomplete.css",
                "~/Content/themes/base/jquery.ui.button.css",
                "~/Content/themes/base/jquery.ui.dialog.css",
                "~/Content/themes/base/jquery.ui.slider.css",
                "~/Content/themes/base/jquery.ui.tabs.css",
                "~/Content/themes/base/jquery.ui.datepicker.css",
                "~/Content/themes/base/jquery.ui.progressbar.css",
                "~/Content/themes/base/jquery.ui.theme.css"));

            var cssTransformer = new CssTransformer();
            var nullOrderer = new NullOrderer();

            var css = new StyleBundle("~/bundles/style").Include(
                "~/Content/Styles/Variables.less",
                "~/Content/Styles/Layout.less",
                "~/Content/Styles/Icons.less",
                "~/Content/Styles/Index.less",
                "~/Content/Styles/Site.less");

            css.Transforms.Add(cssTransformer);
            css.Orderer = nullOrderer;

            bundles.Add(css);

            /*
             * Scripts
             */
            bundles.Add(new ScriptBundle("~/bundles/modernizr").Include(
                "~/Content/Scripts/vendor/modernizr.js"));

            bundles.Add(new ScriptBundle("~/bundles/foundation/scripts").Include(
                "~/Content/Scripts/vendor/foundation.js",
                "~/Content/Scripts/vendor/app.js"));

            bundles.Add(new ScriptBundle("~/bundles/jqueryui").Include(
                "~/Content/Scripts/vendor/jquery-ui-{version}.js"));

            bundles.Add(new ScriptBundle("~/bundles/layout").Include(
                "~/Content/Scripts/Shared/_Layout.js"));
        }
        // For more information on Bundling, visit http://go.microsoft.com/fwlink/?LinkId=254726
        public static void RegisterBundles(BundleCollection bundles)
        {
            //This setting is used when if you have specfied the path Using System.web.Optimization.bundle.Cdnpath then it will try to fetch data from there first
            bundles.UseCdn = true;
            //NullBuilder class is responsible for prevention of early applying of the item transformations and combining of code.
            var nullBuilder = new NullBuilder();
            //StyleTransformer and ScriptTransformer classes produce processing of stylesheets and scripts.
            var styleTransformer = new StyleTransformer();

            var scriptTransformer = new ScriptTransformer();
            //NullOrderer class disables the built-in sorting mechanism and save assets sorted in the order they are declared.
            var nullOrderer = new NullOrderer();

            //create your own scriptbundle

            var scriptbundleToObfuscate = new Bundle("~/bundles/WebFormsJs");
            scriptbundleToObfuscate.Include("~/Scripts/WebForms/WebForms.js",
                  "~/Scripts/WebForms/WebUIValidation.js",
                  "~/Scripts/WebForms/MenuStandards.js",
                  "~/Scripts/WebForms/Focus.js",
                  "~/Scripts/WebForms/GridView.js",
                  "~/Scripts/WebForms/DetailsView.js",
                  "~/Scripts/WebForms/TreeView.js",
                  "~/Scripts/WebForms/WebParts.js");
            scriptbundleToObfuscate.Builder = nullBuilder;
            scriptbundleToObfuscate.Transforms.Add(scriptTransformer);
            scriptbundleToObfuscate.Orderer = nullOrderer;
            bundles.Add(scriptbundleToObfuscate);

            //bundles.Add(new ScriptBundle("~/bundles/WebFormsJs").Include(
            //      "~/Scripts/WebForms/WebForms.js",
            //      "~/Scripts/WebForms/WebUIValidation.js",
            //      "~/Scripts/WebForms/MenuStandards.js",
            //      "~/Scripts/WebForms/Focus.js",
            //      "~/Scripts/WebForms/GridView.js",
            //      "~/Scripts/WebForms/DetailsView.js",
            //      "~/Scripts/WebForms/TreeView.js",
            //      "~/Scripts/WebForms/WebParts.js"));

            bundles.Add(new ScriptBundle("~/bundles/MsAjaxJs").Include(
                "~/Scripts/WebForms/MsAjax/MicrosoftAjax.js",
                "~/Scripts/WebForms/MsAjax/MicrosoftAjaxApplicationServices.js",
                "~/Scripts/WebForms/MsAjax/MicrosoftAjaxTimer.js",
                "~/Scripts/WebForms/MsAjax/MicrosoftAjaxWebForms.js"));

            // Use the Development version of Modernizr to develop with and learn from. Then, when you’re
            // ready for production, use the build tool at http://modernizr.com to pick only the tests you need
            bundles.Add(new ScriptBundle("~/bundles/modernizr").Include(
                "~/Scripts/modernizr-*"));

            BundleTable.EnableOptimizations = true;
        }
Пример #16
0
        public static void RegisterBundles(BundleCollection bundles)
        {
            var cssTransformer = new CssTransformer();
            var jsTransformer = new JsTransformer();
            var nullOrderer = new NullOrderer();

            var commonStylesBundle = new Bundle("~/Bundles/Styles");
            commonStylesBundle.Include(
               "~/stylesheets/screen.css");
            commonStylesBundle.Transforms.Add(cssTransformer);
            commonStylesBundle.Orderer = nullOrderer;

            bundles.Add(commonStylesBundle);

            //var modernizrBundle = new Bundle("~/Bundles/Modernizr");
            //modernizrBundle.Include("~/Scripts/modernizr-2.*");
            //modernizrBundle.Transforms.Add(jsTransformer);
            //modernizrBundle.Orderer = nullOrderer;

            //bundles.Add(modernizrBundle);

            var commonScriptsBundle = new Bundle("~/Bundles/ProjectAether");
            commonScriptsBundle.Include(//"~/ProjectAether/libs/knockout.debug.js",
                "~/libs/underscore.js",
                "~/libs/underscore-ko-1.1.0.js",
                "~/libs/hash/jshashset.js",
                "~/libs/hash/jshashtable.js",
                "~/app/helper.js")
                   .IncludeDirectory("~/app", "*.js", true);

            commonScriptsBundle.Transforms.Add(jsTransformer);
            commonScriptsBundle.Orderer = nullOrderer;

            bundles.Add(commonScriptsBundle);

            var testScriptsBundle = new Bundle("~/Bundles/Tests");
            testScriptsBundle.Include(//"~/ProjectAether/libs/knockout.debug.js",
                "~/libs/underscore.js",
                "~/libs/underscore-ko-1.1.0.js",
                "~/libs/hash/jshashset.js",
                "~/libs/hash/jshashtable.js",
                "~/app/helper.js")
                   .IncludeDirectory("~/tests/app", "*.js", true);

            testScriptsBundle.Transforms.Add(jsTransformer);
            testScriptsBundle.Orderer = nullOrderer;

            bundles.Add(testScriptsBundle);
        }
Пример #17
0
        // For more information on Bundling, visit http://go.microsoft.com/fwlink/?LinkId=254725
        public static void RegisterBundles(BundleCollection bundles)
        {
            var cssTransformer = new CssTransformer();
            var nullOrderer = new NullOrderer();

            bundles.Add(new ScriptBundle("~/bundles/jquery").Include(
                        "~/Scripts/jquery-{version}.js"));

            bundles.Add(new ScriptBundle("~/bundles/jqueryui").Include(
                        "~/Scripts/jquery-ui-{version}.js"));

            bundles.Add(new ScriptBundle("~/bundles/jqueryval").Include(
                        "~/Scripts/jquery.unobtrusive*",
                        "~/Scripts/jquery.validate*"));

            // Use the development version of Modernizr to develop with and learn from. Then, when you're
            // ready for production, use the build tool at http://modernizr.com to pick only the tests you need.
            bundles.Add(new ScriptBundle("~/bundles/modernizr").Include(
                        "~/Scripts/modernizr-*"));

            //bundles.Add(new StyleBundle("~/Content/css").Include("~/Content/site.css"));

            bundles.Add(new StyleBundle("~/Content/themes/base/css").Include(
                        "~/Content/themes/base/jquery.ui.core.css",
                        "~/Content/themes/base/jquery.ui.resizable.css",
                        "~/Content/themes/base/jquery.ui.selectable.css",
                        "~/Content/themes/base/jquery.ui.accordion.css",
                        "~/Content/themes/base/jquery.ui.autocomplete.css",
                        "~/Content/themes/base/jquery.ui.button.css",
                        "~/Content/themes/base/jquery.ui.dialog.css",
                        "~/Content/themes/base/jquery.ui.slider.css",
                        "~/Content/themes/base/jquery.ui.tabs.css",
                        "~/Content/themes/base/jquery.ui.datepicker.css",
                        "~/Content/themes/base/jquery.ui.progressbar.css",
                        "~/Content/themes/base/jquery.ui.theme.css"));

            //var myLess = new StyleBundle("~/Content/myLess").Include(
            //    "~/Content/bootstrap/reset.less");
            //bootstrapCss.Transforms.Add(new LessMinify());
            //bundles.Add(myLess);

            var myLessBundle = new Bundle("~/bundles/css")
                .Include("~/Content/reset.less", "~/Content/site.less");
            myLessBundle.Transforms.Add(cssTransformer);
            myLessBundle.Orderer = nullOrderer;

            bundles.Add(myLessBundle);
        }
Пример #18
0
        // For more information on bundling, visit http://go.microsoft.com/fwlink/?LinkId=301862
        public static void RegisterBundles(BundleCollection bundles)
        {
            var nullBuilder = new NullBuilder();
            var styleTransformer = new StyleTransformer();
            var scriptTransformer = new ScriptTransformer();
            var nullOrderer = new NullOrderer();

            BundleResolver.Current = new CustomBundleResolver();
            var cssBundle = new Bundle("~/Content/css");
            cssBundle.Include(
                      "~/Content/bootstrap.css",
                      "~/Content/Site.css",
                      "~/Content/Bootstrap/kendo.common-bootstrap.min.css",
                      "~/Content/Bootstrap/kendo.bootstrap.min.css",
                      "~/Scripts/Toastr/toastr.min.css"
                      );
            cssBundle.Builder = nullBuilder;
            cssBundle.Transforms.Add(styleTransformer);
            cssBundle.Orderer = nullOrderer;
            bundles.Add(cssBundle);

            var jsMainBundle = new Bundle("~/bundles/js");
            jsMainBundle.Include(
                    "~/Scripts/jquery-1.11.1.min.js",
                    "~/Scripts/bootstrap.min.js",
                    "~/Scripts/jquery.unobtrusive-ajax.min.js",
                    "~/Scripts/Toastr/ToastrWrapper.js",
                    "~/Scripts/Toastr/toastr.min.js",
                    "~/Scripts/Kendo/kendo.web.min.js",
                    "~/Scripts/Kendo/kendo.culture.ru-RU.min.js",
                    "~/Scripts/Angular/angular.min.js",
                    "~/Scripts/Kendo/kendo.angular.min.js"
                      );
            jsMainBundle.Builder = nullBuilder;
            jsMainBundle.Transforms.Add(scriptTransformer);
            jsMainBundle.Orderer = nullOrderer;
            bundles.Add(jsMainBundle);

            var jsVendorAppBulk = new Bundle("~/bundles/jsVendorApp");
            jsVendorAppBulk.Include(
                        "~/Scripts/Angular/vendorApp.js"
                      );
            jsVendorAppBulk.Builder = nullBuilder;
            jsVendorAppBulk.Transforms.Add(scriptTransformer);
            jsVendorAppBulk.Orderer = nullOrderer;
            bundles.Add(jsVendorAppBulk);
        }
Пример #19
0
        // For more information on bundling, visit http://go.microsoft.com/fwlink/?LinkId=301862
        public static void RegisterBundles(BundleCollection bundles)
        {
            bundles.UseCdn = true;
            var cssTransformer = new StyleTransformer();
            var jsTransformer = new ScriptTransformer();
            var nullOrderer = new NullOrderer();

            var cssBundle = new StyleBundle("~/bundles/css");
            cssBundle.Include("~/Content/Site.less", "~/Content/bootstrap/bootstrap.less", "~/Content/FontAwsome/font-awesome.less");
            cssBundle.Transforms.Add(cssTransformer);
            cssBundle.Orderer = nullOrderer;
            bundles.Add(cssBundle);

            var jqueryBundle = new ScriptBundle("~/bundles/jquery");
            jqueryBundle.Include("~/Scripts/jquery-{version}.js");
            jqueryBundle.Transforms.Add(jsTransformer);
            jqueryBundle.Orderer = nullOrderer;
            bundles.Add(jqueryBundle);

            var jqueryvalBundle = new ScriptBundle("~/bundles/jqueryval");
            jqueryvalBundle.Include("~/Scripts/jquery.validate*", "~/Scripts/jquery.unobtrusive-ajax*");
            jqueryvalBundle.Transforms.Add(jsTransformer);
            jqueryvalBundle.Orderer = nullOrderer;
            bundles.Add(jqueryvalBundle);

            // Use the development version of Modernizr to develop with and learn from. Then, when you're
            // ready for production, use the build tool at http://modernizr.com to pick only the tests you need.

            var modernizrBundle = new ScriptBundle("~/bundles/modernizr");
            modernizrBundle.Include("~/Scripts/modernizr-*");
            modernizrBundle.Transforms.Add(jsTransformer);
            modernizrBundle.Orderer = nullOrderer;
            bundles.Add(modernizrBundle);

            var bootstrapBundle = new ScriptBundle("~/bundles/bootstrap");
            bootstrapBundle.Include("~/Scripts/bootstrap.js", "~/Scripts/respond.js");
            bootstrapBundle.Transforms.Add(jsTransformer);
            bootstrapBundle.Orderer = nullOrderer;
            bundles.Add(bootstrapBundle);


            var sitescriptsBundle = new ScriptBundle("~/bundles/sitescripts");
            sitescriptsBundle.Include("~/Scripts/mbExtruder.js");
            sitescriptsBundle.Transforms.Add(jsTransformer);
            sitescriptsBundle.Orderer = nullOrderer;
            bundles.Add(sitescriptsBundle);
        }
Пример #20
0
        // For more information on Bundling, visit http://go.microsoft.com/fwlink/?LinkId=254725
        public static void RegisterBundles(BundleCollection bundles)
        {
            bundles.Add(new ScriptBundle("~/bundles/js/jquery").Include(
                        "~/Public/js/jquery-1.8.3.js"));

            var cssTransformer = new CssTransformer();
            var nullOrderer = new NullOrderer();

            var css = new Bundle("~/bundles/css/site")
                .Include("~/Public/css/bootstrap.css")
                .Include("~/Public/css/bootstrap-responsive.css")
                .Include("~/Public/css/site.less");

            css.Transforms.Add(cssTransformer);
            css.Orderer = nullOrderer;

            bundles.Add(css);
        }
Пример #21
0
        public static void RegisterBundles(BundleCollection bundles)
        {
            bundles.UseCdn = true;
            var cssTransformer = new StyleTransformer();
            var jsTransformer = new ScriptTransformer();
            var nullOrderer = new NullOrderer();

            var cssBundle = new StyleBundle("~/bundles/css");
            cssBundle.Include("~/Content/Site.less", "~/Content/bootstrap/bootstrap.less");
            cssBundle.Transforms.Add(cssTransformer);
            cssBundle.Orderer = nullOrderer;
            bundles.Add(cssBundle);

            var jqueryBundle = new ScriptBundle("~/bundles/jquery");
            jqueryBundle.Include("~/Scripts/jquery-{version}.js");
            jqueryBundle.Transforms.Add(jsTransformer);
            jqueryBundle.Orderer = nullOrderer;
            bundles.Add(jqueryBundle);

            var jqueryvalBundle = new ScriptBundle("~/bundles/jqueryval");
            jqueryvalBundle.Include("~/Scripts/jquery.validate*");
            jqueryvalBundle.Transforms.Add(jsTransformer);
            jqueryvalBundle.Orderer = nullOrderer;
            bundles.Add(jqueryvalBundle);

            var modernizrBundle = new ScriptBundle("~/bundles/modernizr");
            modernizrBundle.Include("~/Scripts/modernizr-*");
            modernizrBundle.Transforms.Add(jsTransformer);
            modernizrBundle.Orderer = nullOrderer;
            bundles.Add(modernizrBundle);

            var bootstrapBundle = new ScriptBundle("~/bundles/bootstrap");
            bootstrapBundle.Include("~/Scripts/bootstrap.js", "~/Scripts/respond.js");
            bootstrapBundle.Transforms.Add(jsTransformer);
            bootstrapBundle.Orderer = nullOrderer;
            bundles.Add(bootstrapBundle);

            var knockout = new ScriptBundle("~/bundles/ko");
            knockout.Include("~/Scripts/knockout-3.3.0.js");
            knockout.Include("~/Scripts/underscore.min.js");
            knockout.Transforms.Add(jsTransformer);
            knockout.Orderer = nullOrderer;
            bundles.Add(knockout);
        }
        // For more information on bundling, visit http://go.microsoft.com/fwlink/?LinkId=301862
        public static void RegisterBundles(BundleCollection bundles)
        {
            bundles.UseCdn = true;
            var cssTransformer = new StyleTransformer();
            var jsTransformer = new ScriptTransformer();
            var nullOrderer = new NullOrderer();

            var cssBundle = new StyleBundle("~/bundles/css");
            cssBundle.Include("~/Content/Css/Site.less", "~/Content/bootstrap/bootstrap.less", "~/Content/Css/Init.less");
            // JEMO : Add our custom Default Css files
            cssBundle.Transforms.Add(cssTransformer);
            cssBundle.Orderer = nullOrderer;
            bundles.Add(cssBundle);

            var jqueryBundle = new ScriptBundle("~/bundles/jquery");
            jqueryBundle.Include("~/Scripts/jquery-{version}.js", "~/Scripts/jquery.unobtrusive-ajax.js");
            // JEMO : added jquery.unobtrusive-ajax script in order to do partial view postbacks with build-in mvc ajax support
            jqueryBundle.Transforms.Add(jsTransformer);
            jqueryBundle.Orderer = nullOrderer;
            bundles.Add(jqueryBundle);

            var jqueryvalBundle = new ScriptBundle("~/bundles/jqueryval");
            jqueryvalBundle.Include("~/Scripts/jquery.validate*");
            jqueryvalBundle.Transforms.Add(jsTransformer);
            jqueryvalBundle.Orderer = nullOrderer;
            bundles.Add(jqueryvalBundle);

            // Use the development version of Modernizr to develop with and learn from. Then, when you're
            // ready for production, use the build tool at http://modernizr.com to pick only the tests you need.

            var modernizrBundle = new ScriptBundle("~/bundles/modernizr");
            modernizrBundle.Include("~/Scripts/modernizr-*");
            modernizrBundle.Transforms.Add(jsTransformer);
            modernizrBundle.Orderer = nullOrderer;
            bundles.Add(modernizrBundle);

            var bootstrapBundle = new ScriptBundle("~/bundles/bootstrap");
            bootstrapBundle.Include("~/Scripts/bootstrap.js", "~/Scripts/respond.js");
            bootstrapBundle.Transforms.Add(jsTransformer);
            bootstrapBundle.Orderer = nullOrderer;
            bundles.Add(bootstrapBundle);
        }
Пример #23
0
        public static void RegisterBundles(BundleCollection bundles)
        {
            /*
             * Styles
             */
            bundles.Add(new StyleBundle("~/bundles/foundation/style").Include(
                "~/Content/Styles/Foundation/foundation.css"));

            bundles.Add(new StyleBundle("~/bundles/jqueryui/style").Include(
                "~/Content/Styles/JqueryUI/jquery-ui.css"));

            var cssTransformer = new CssTransformer();
            var nullOrderer = new NullOrderer();

            var css = new StyleBundle("~/bundles/style").Include(
                "~/Content/Styles/Variables.less",
                "~/Content/Styles/Icons.less",
                "~/Content/Styles/Layout.less",
                "~/Content/Styles/Site.less");

            css.Transforms.Add(cssTransformer);
            css.Orderer = nullOrderer;

            bundles.Add(css);

            /*
             * Scripts
             */
            bundles.Add(new ScriptBundle("~/bundles/modernizr/script").Include(
                "~/Content/Scripts/Vendor/modernizr.js"));

            bundles.Add(new ScriptBundle("~/bundles/foundation/script").Include(
                "~/Content/Scripts/Vendor/foundation.js",
                "~/Content/Scripts/Vendor/app.js"));

            bundles.Add(new ScriptBundle("~/bundles/jqueryui/script").Include(
                "~/Content/Scripts/Vendor/jquery-ui-{version}.js"));

            bundles.Add(new ScriptBundle("~/bundles/script").Include(
                "~/Content/Scripts/Shared/_Layout.js",
                "~/Content/Scripts/Main/Data.js"));
        }
Пример #24
0
        public void Run()
        {
            var bundles = BundleTable.Bundles;

            var cssTransformer = new CssTransformer();
            var jsTransformer = new JsTransformer();
            var nullOrderer = new NullOrderer();

            bundles.Add(new ScriptBundle("~/js/jquery").Include(
                        "~/js/libs/jquery-{version}.js"));

            bundles.Add(new ScriptBundle("~/js/all").Include(
                        "~/js/libs/bootstrap.js",
                        "~/js/libs/knockout-2.1.0.js"));

            // Use the development version of Modernizr to develop with and learn from. Then, when you're
            // ready for production, use the build tool at http://modernizr.com to pick only the tests you need.
            bundles.Add(new ScriptBundle("~/js/modernizr").Include(
                        "~/js/libs/modernizr-*"));

            var bootstrapBundle = new Bundle("~/css/bootstrap")
                .Include("~/css/less/libs/bootstrap/bootstrap.less",
                         "~/css/less/libs/bootstrap/responsive.less");

            bootstrapBundle.Transforms.Add(cssTransformer);
            bootstrapBundle.Orderer = nullOrderer;

            bundles.Add(bootstrapBundle);

            var styleBundle = new Bundle("~/css/styles")
                .Include("~/css/less/mylibs/site.less",
                         "~/css/less/mylibs/site-responsive.less",
                         "~/css/less/plugins/registration.less");

            styleBundle.Transforms.Add(cssTransformer);
            styleBundle.Orderer = nullOrderer;

            bundles.Add(styleBundle);

            bundles.Add(new StyleBundle("~/css/fontawesome")
                .Include("~/css/font-awesome.css"));
        }
Пример #25
0
        // For more information on Bundling, visit http://go.microsoft.com/fwlink/?LinkId=254725
        public static void RegisterBundles(BundleCollection bundles)
        {
            var cssTransformer = new CssTransformer();
            var jsTransformer = new JsTransformer();
            var nullOrderer = new NullOrderer();

            var css = new Bundle("~/css/base")
                .Include("~/Less/main.less");
            css.Transforms.Add(cssTransformer);
            css.Orderer = nullOrderer;

            bundles.Add(css);

            //var jquery = new Bundle("~/bundles/jquery")
            //    .Include("~/Scripts/jquery-1.*");
            //jquery.Transforms.Add(jsTransformer);
            //jquery.Orderer = nullOrderer;

            //bundles.Add(jquery);
        }
Пример #26
0
        public static void RegisterBundles(BundleCollection bundles)
        {
#if DEBUG
            BundleTable.EnableOptimizations = false;
#else
            BundleTable.EnableOptimizations = true;
#endif
            #region Less Css Transformation
            var cssTransformer = new StyleTransformer();
            var jsTransformer = new ScriptTransformer();
            var nullOrderer = new NullOrderer();

            var css = new StyleBundle("~/bundles/css")
            .Include("~/Content/site.less")
            .Include("~/Content/jquery.bootstrap-touchspin.css");
            css.Transforms.Add(cssTransformer);
            css.Orderer = nullOrderer;
            #endregion

            #region JQuery
            
            var jquery = new ScriptBundle("~/bundles/jquery");
            
            var sdir = "~/Scripts";
#if DEBUG

            var jqueries = new string[] { "jquery-1.9.0", "jquery.validate", "jquery.validate.unobtrusive", "jquery.validate.unobtrusive.bootstrap" ,"jquery.bootstrap-touchspin","bootstrap-toolkit"};
            
#endif
            jquery.Include(sdir, jqueries);
            #endregion

            #region site
            var site = new ScriptBundle("~/bundles/site");
            site.Include("~/js/site.js");
            #endregion

            bundles.Add(css);
            bundles.Add(jquery);
            bundles.Add(site);
        }
Пример #27
0
        /// <summary>
        /// See http://www.codeproject.com/Articles/863295/Hack-proof-your-Javascript-using-javascript-Obfusc
        /// </summary>
        /// <param name="bundles"></param>
        private static void _RegisterObfuscatedScriptsBundle(BundleCollection bundles)
        {
            // This setting is used when if you have specfied the path Using System.web.Optimization.bundle.Cdnpath then
            // it will try to fetch data from there first
            bundles.UseCdn = true;

            // NullBuilder class is responsible for prevention of early applying of the item transformations and combining of code.
            var nullBuilder = new NullBuilder();

            /*
            // Replace a default bundle resolver in order to the debugging HTTP-handler
            // can use transformations of the corresponding bundle
            BundleResolver.Current = new CustomBundleResolver();
            */

            // StyleTransformer and ScriptTransformer classes produce processing of stylesheets and scripts.
            var styleTransformer = new StyleTransformer();
            var scriptTransformer = new ScriptTransformer();

            // NullOrderer class disables the built-in sorting mechanism and save assets sorted in the order they are declared.
            var nullOrderer = new NullOrderer();

            // create your own scriptbundle
            var obfuscatedScriptBundle = new Bundle("~/Bundles/Gallery")
            {
                Builder = nullBuilder,
                Orderer = nullOrderer
            };
            obfuscatedScriptBundle.Include(
                "~/Scripts/jquery-{version}.js",
                "~/Scripts/knockout-{version}.js",
                "~/Scripts/date.format.js",
                "~/Scripts/jquery.extensions.js",
                "~/Scripts/root.extensions.js",
                "~/Scripts/root.gallery.js",
                "~/Scripts/root.photo-box.js",
                "~/Scripts/root.slider.js");
            obfuscatedScriptBundle.Transforms.Add(scriptTransformer);

            bundles.Add(obfuscatedScriptBundle);
        }
Пример #28
0
        // For more information on Bundling, visit http://go.microsoft.com/fwlink/?LinkId=254725
        public static void RegisterBundles(BundleCollection bundles)
        {
            var nullBuilder = new NullBuilder();
            var nullOrderer = new NullOrderer();

            var styleBundle = new CustomStyleBundle("~/Assets/bundle/styles/order");
            styleBundle.Include("~/Assets/bootstrap/css/bootstrap.min.css",
                "~/Assets/bootstrap/css/bootstrap-theme.min.css",
                "~/Assets/bootstrap/css/bootstrap-glyphicons.css",
                "~/Assets/css/shared_order/style.min.css");
            styleBundle.Builder = nullBuilder;
            styleBundle.Orderer = nullOrderer;
            bundles.Add(styleBundle);

            var styleComponentBundle = new CustomStyleBundle("~/Assets/bundle/styles");
            styleComponentBundle.Include("~/Assets/css/shared/*.css");
            styleComponentBundle.Builder = nullBuilder;
            styleComponentBundle.Orderer = nullOrderer;
            bundles.Add(styleComponentBundle);

            var scriptBundle = new CustomScriptBundle("~/Assets/bundle/scripts/order");
            scriptBundle.Include("~/Assets/bootstrap/js/bootstrap.min.js",
                "~/Assets/js/shared_order/angular/angular.min.js",
                "~/Assets/js/shared_order/lodash.js",
                "~/Assets/js/shared_order/restangular.js",
                "~/Assets/js/shared_order/fullcalendar.js",
                "~/Assets/js/shared_order/calendar.js",
                "~/Assets/js/shared_order/gcal.js",
                "~/Assets/js/shared_order/moment.js");
            scriptBundle.Builder = nullBuilder;
            scriptBundle.Orderer = nullOrderer;
            bundles.Add(scriptBundle);

            var scriptComponentBundle = new CustomScriptBundle("~/Assets/bundle/scripts");
            scriptComponentBundle.Include("~/Assets/js/shared/*.js");
            scriptComponentBundle.Builder = nullBuilder;
            scriptComponentBundle.Orderer = nullOrderer;
            bundles.Add(scriptComponentBundle);
        }
Пример #29
0
        internal static void RegisterBundles(BundleCollection bundleCollection)
        {
            bundleCollection.UseCdn = true;

            var nullBuilder = new NullBuilder();
            var nullOrderer = new NullOrderer();

            //Jquery - TODO: It would be awesome to add a build step to get only what we need from jquery
            var jqueryBundle = new CustomScriptBundle("~/bundles/jquery", "//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js");
            jqueryBundle.Include("~/scripts/vendor/jquery-{version}.js");
            jqueryBundle.CdnFallbackExpression = "window.jQuery";
            jqueryBundle.Orderer = nullOrderer;
            bundleCollection.Add(jqueryBundle);

            //Modernizr - TODO: same as jquery build step
            var modernizrBundle = new CustomScriptBundle("~/bundles/modernizr");
            modernizrBundle.Include("~/scripts/vendor/modernizr-2.6.2.js");
            modernizrBundle.Orderer = nullOrderer;
            bundleCollection.Add(modernizrBundle);

            //Remaining js
            var mainjsBundle = new CustomScriptBundle("~/bundles/site-js");
            mainjsBundle.Include("~/scripts/main.js", "~/scripts/plugins.js");
            mainjsBundle.Orderer = nullOrderer;
            bundleCollection.Add(mainjsBundle);

            //Less
            var mainlessBundle = new CustomStyleBundle("~/bundles/site-less");
            mainlessBundle.Include("~/less/main.less");
            mainlessBundle.Orderer = nullOrderer;
            bundleCollection.Add(mainlessBundle);

            //Css - Place plugin's css files
            var maincssBundle = new CustomStyleBundle("~/bundles/site-css");
            maincssBundle.IncludeDirectory("~/css", "*.css");
            maincssBundle.Orderer = nullOrderer;
            bundleCollection.Add(maincssBundle);
        }
Пример #30
0
        // Pour plus d’informations sur le regroupement, rendez-vous sur http://go.microsoft.com/fwlink/?LinkId=301862
        public static void RegisterBundles(BundleCollection bundles)
        {
#if DEBUG
            BundleTable.EnableOptimizations = false;
#else
            BundleTable.EnableOptimizations = true;
#endif

            bundles.Add(new ScriptBundle("~/bundles/jquery").Include(
                        "~/Scripts/jquery-{version}.js"));

            // Utilisez la version de développement de Modernizr pour développer et apprendre. Puis, lorsque vous êtes
            // prêt pour la production, utilisez l’outil de génération sur http://modernizr.com pour sélectionner uniquement les tests dont vous avez besoin.
            bundles.Add(new ScriptBundle("~/bundles/modernizr").Include(
                        "~/Scripts/modernizr-*"));

            bundles.Add(new ScriptBundle("~/bundles/bootstrap").Include(
                      "~/Scripts/bootstrap.js",
                      "~/Scripts/respond.js"));


            #region Less Css Transformation
            var cssTransformer = new StyleTransformer();
            var jsTransformer = new ScriptTransformer();
            var nullOrderer = new NullOrderer();

            var css = new StyleBundle("~/Content/css")
            .Include("~/Content/site.less");
           // .Include("~/Content/jquery.bootstrap-touchspin.css");
            css.Transforms.Add(cssTransformer);
            css.Orderer = nullOrderer;
            bundles.Add(css);
            #endregion

           /* bundles.Add(new StyleBundle("~/Content/css").Include(
                      "~/Content/bootstrap.css",
                      "~/Content/site.css"));*/
        }