예제 #1
0
 protected void Application_Start(object sender, EventArgs args)
 {
     var scriptBundle = new CustomScriptBundle("~/Scripts/combined");
     scriptBundle.Include("~/Scripts/libs/*.js");
     scriptBundle.Include("~/Scripts/*.ts");
     scriptBundle.Orderer = new ScriptDependencyOrderer();
     BundleTable.Bundles.Add(scriptBundle);
 }
예제 #2
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);
        }
예제 #3
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);
		}
예제 #4
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);
        }
예제 #5
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);
        }
예제 #6
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);
        }
예제 #7
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 signalRBundle = new CustomScriptBundle("~/bundles/jquery-signalR");
            jqueryBundle.Include("~/Scripts/jquery.signalR-{version}.js", "~/Scripts/jquery.signalR-{version}.min.js");
            jqueryBundle.Transforms.Add(jsTransformer);
            jqueryBundle.Orderer = nullOrderer;
            bundles.Add(signalRBundle);

            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/bootstrap.min.js", "~/Scripts/respond.js");
            bootstrapBundle.Transforms.Add(jsTransformer);
            bootstrapBundle.Orderer = nullOrderer;
            bundles.Add(bootstrapBundle);

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

            //Google Map CSS bundle
            var googMapCSS = new CustomStyleBundle("~/bundles/googMapCSS");
            googMapCSS.Include("~/Content/Map/GOOG/*.css");
            googMapCSS.Transforms.Add(cssTransformer);
            googMapCSS.Orderer = nullOrderer;
            bundles.Add(googMapCSS);
            
            //Google Map JS bundle
            var googMapJS = new CustomScriptBundle("~/bundles/googMapJS");
            googMapJS.Include("~/Content/Map/GOOG/*.js");
            googMapJS.Transforms.Add(jsTransformer);
            googMapJS.Orderer = nullOrderer;
            bundles.Add(googMapJS);

            //Open Layers Map CSS bundle
            var olMapCSS = new CustomStyleBundle("~/bundles/olMapCSS");
            olMapCSS.Include("~/Content/Map/OL/*.css");
            olMapCSS.Transforms.Add(cssTransformer);
            olMapCSS.Orderer = nullOrderer;
            bundles.Add(olMapCSS);

            //Open Layers Map JS bundle
            var olMapJS = new CustomScriptBundle("~/bundles/olMapJS");
            olMapJS.Include("~/Content/Map/OL/*.js");
            olMapJS.Transforms.Add(jsTransformer);
            olMapJS.Orderer = nullOrderer;
            bundles.Add(olMapJS);

            //Angular Scripts Bundle
            var angularJS = new CustomScriptBundle("~/bundles/angular");
            angularJS.Include("~/Scripts/angular-route.js");
            angularJS.Include("~/Scripts/angular-resource.js");
            angularJS.Include("~/Scripts/angular-animate.js");
            angularJS.Include("~/Scripts/angular.js");
            angularJS.Include("~/Controllers/app/js/admin_page/admin_page.app.js");
            angularJS.Include("~/Controllers/app/js/admin_page/controllers/admin.ctrl.js");
            angularJS.Transforms.Add(jsTransformer);
            angularJS.Orderer = nullOrderer;
            bundles.Add(angularJS);

            var detailView = new CustomStyleBundle("~/bundles/detailsCSS");
            detailView.Include("~/Content/detailViewResources/dv.css");
            detailView.Transforms.Add(cssTransformer);
            detailView.Orderer = nullOrderer;
            bundles.Add(detailView);

            var detailViewJS = new CustomScriptBundle("~/bundles/detailsJS");
            detailViewJS.Include("~/Content/detailViewResources/dv.js");
            detailViewJS.Transforms.Add(jsTransformer);
            detailViewJS.Orderer = nullOrderer;
            bundles.Add(detailViewJS);

            var sim = new CustomScriptBundle("~/bundles/sim");
            sim.Include("~/Scripts/proj4.js");
            sim.Include("~/Content/NestScripts/reporter.js");
            sim.Include("~/Content/NestScripts/simulation.js");
            sim.Include("~/Content/NestScripts/vehicle.js");
            bundles.Add(sim);
            //Font Awesome
            //var fa = new CustomStyleBundle("~/bundles/fontawesome");
            //fa.Include("~/Content/font-awesome-4.3.0/css/font-awesome.min.css");
            //fa.Include("~/Content/font-awesome-4.3.0/fonts/font-awesome.webfont.woff");
            //bundles.Add(fa);
        }
예제 #8
0
        // For more information on bundling, visit http://go.microsoft.com/fwlink/?LinkId=301862
        public static void RegisterBundles(BundleCollection bundles)
        {
            BundleTable.EnableOptimizations = true;

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

            //Style
            var cssBundle = new CustomStyleBundle("~/bundles/css");
            cssBundle.Include("~/Content/Site.less");
            //cssBundle.Include("~/Content/themes/base/jquery-ui.css");
            cssBundle.Include("~/Content/themes/base/all.css");
            cssBundle.Transforms.Add(cssTransformer);
            cssBundle.Orderer = nullOrderer;
            bundles.Add(cssBundle);

            var cssBootstrapBundle = new CustomStyleBundle("~/bundles/cssBootstrap");
            //cssBootstrapBundle.Include("~/Content/bootstrap/bootstrap.less");
            cssBootstrapBundle.Include("~/Content/bootstrap/bootstrap.css");
            cssBootstrapBundle.Include("~/Content/bootstrap/bootstrap-responsive.css");
            cssBootstrapBundle.Transforms.Add(cssTransformer);
            cssBootstrapBundle.Orderer = nullOrderer;
            bundles.Add(cssBootstrapBundle);

            var cssKendoBundle = new CustomStyleBundle("~/bundles/cssKendo");

            cssKendoBundle.Include("~/Content/kendo/2014.3.1119/kendo.common.min.css");
            cssKendoBundle.Include("~/Content/kendo/2014.3.1119/kendo.default.min.css");

            cssKendoBundle.Transforms.Add(cssTransformer);
            cssKendoBundle.Orderer = nullOrderer;
            bundles.Add(cssKendoBundle);

            var cssAppBundle = new CustomStyleBundle("~/bundles/cssApp");
            cssAppBundle.Include("~/Content/app/AppCommon.css");
            cssAppBundle.Include("~/Content/app/AppCommon.less");
            cssAppBundle.Include("~/Content/app/AmTree.less");
            cssAppBundle.Transforms.Add(cssTransformer);
            cssAppBundle.Orderer = nullOrderer;
            bundles.Add(cssAppBundle);

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

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

            var koBundle = new CustomScriptBundle("~/bundles/ko");
            koBundle.Include("~/Scripts/knockout-{version}.js");
            koBundle.Include("~/Scripts/knockout.mapping-latest.js");
            koBundle.Transforms.Add(jsTransformer);
            koBundle.Orderer = nullOrderer;
            bundles.Add(koBundle);

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

            var jqueryval_1_Bundle = new CustomScriptBundle("~/bundles/jqueryval_1");
            jqueryval_1_Bundle.Include("~/Scripts/jquery.validate.js");
            jqueryval_1_Bundle.Transforms.Add(jsTransformer);
            jqueryval_1_Bundle.Orderer = nullOrderer;
            bundles.Add(jqueryval_1_Bundle);

            var jqueryval_2_Bundle = new CustomScriptBundle("~/bundles/jqueryval_2");
            jqueryval_2_Bundle.Include("~/Scripts/jquery.validate.unobtrusive.js");
            jqueryval_2_Bundle.Transforms.Add(jsTransformer);
            jqueryval_2_Bundle.Orderer = nullOrderer;
            bundles.Add(jqueryval_2_Bundle);

            // 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");
            //bootstrapBundle.Include("~/Scripts/respond.js");
            bootstrapBundle.Transforms.Add(jsTransformer);
            bootstrapBundle.Orderer = nullOrderer;
            bundles.Add(bootstrapBundle);

            var kendoKoBundle = new CustomScriptBundle("~/bundles/kendoKo");

            kendoKoBundle.Include("~/Scripts/kendo/2014.3.1119/jszip.min.js");
            kendoKoBundle.Include("~/Scripts/kendo/2014.3.1119/kendo.web.min.js");

            kendoKoBundle.Include("~/Scripts/knockout-kendo.js");
            kendoKoBundle.Transforms.Add(jsTransformer);
            kendoKoBundle.Orderer = nullOrderer;
            bundles.Add(kendoKoBundle);

            var appBundle = new CustomScriptBundle("~/bundles/app");
            appBundle.Include("~/Scripts/App/AppKo.js");
            appBundle.Include("~/Scripts/App/AppCommon.js");
            appBundle.Include("~/Scripts/App/UpDown.js");
            appBundle.Include("~/Scripts/App/dimension.js");
            appBundle.Include("~/Scripts/App/dialog.js");
            appBundle.Include("~/Scripts/App/kGrid.js");
            appBundle.Include("~/Scripts/App/message.js");
            appBundle.Include("~/Scripts/App/AppMenuNToolTip.js");
            appBundle.Include("~/Scripts/App/RemoteEvent.js");
            appBundle.Transforms.Add(jsTransformer);
            appBundle.Orderer = nullOrderer;
            bundles.Add(appBundle);

            var appBundle_Local = new CustomScriptBundle("~/bundles/app_Local");
            appBundle_Local.Include("~/Scripts/App/AppKo_Local.js");
            appBundle_Local.Transforms.Add(jsTransformer);
            appBundle_Local.Orderer = nullOrderer;
            bundles.Add(appBundle_Local);

            var appBundle_Remote = new CustomScriptBundle("~/bundles/app_Remote");
            appBundle_Remote.Include("~/Scripts/App/AppKo_Remote.js");
            appBundle_Remote.Transforms.Add(jsTransformer);
            appBundle_Remote.Orderer = nullOrderer;
            bundles.Add(appBundle_Remote);

            var retNRfBundle = new CustomScriptBundle("~/bundles/retNRf");
            retNRfBundle.Include("~/Scripts/App/RETnRF.js");
            retNRfBundle.Transforms.Add(jsTransformer);
            retNRfBundle.Orderer = nullOrderer;
            bundles.Add(retNRfBundle);
        }
예제 #9
0
        public static void RegisterBundles(BundleCollection bundles)
        {
            _bundles = bundles;
            bundles.UseCdn = true;

            var nullBuilder = new NullBuilder();
            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(
                "~/Content/bootstrap.css",
                "~/Content/font-awesome.css");
            commonStylesBundle.Orderer = nullOrderer;
            bundles.Add(commonStylesBundle);

            var themeFolders = Directory.GetDirectories(HostingEnvironment.MapPath("~/Content/Themes"));
            foreach (var folder in themeFolders)
            {
                try
                {
                    var themeName = folder.Substring(folder.LastIndexOf(@"\", System.StringComparison.Ordinal) + 1);

                    var stylesBundle = new CustomStyleBundle(string.Format("~/Bundles/Themes/{0}/Styles", themeName));
                    stylesBundle.Include(
                        string.Format("~/Content/Themes/{0}/css/*.css", themeName));
                    //string.Format("~/Content/Themes/{0}/css/*.less", themeName));
                    stylesBundle.Orderer = nullOrderer;
                    bundles.Add(stylesBundle);

                    var scriptsBundle = new CustomScriptBundle(string.Format("~/Bundles/Themes/{0}/Scripts", themeName));
                    scriptsBundle.Include(string.Format("~/Content/Themes/{0}/js/*.js", themeName));
                    scriptsBundle.Orderer = nullOrderer;
                    bundles.Add(scriptsBundle);
                }
                catch (ArgumentException err)
                {
                    if (err.ParamName != "directoryVirtualPath") throw;
                }
            }

            var adminStylesBundle = new CustomStyleBundle("~/Bundles/AdminStyles");
            adminStylesBundle.Include(
                "~/Content/admin/css/animate.css",
                "~/Content/admin/css/style.css",
                "~/Content/admin/css/*.css");
            adminStylesBundle.Orderer = nullOrderer;
            bundles.Add(adminStylesBundle);

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

            var paceBundle = new CustomScriptBundle("~/Bundles/Pace");
            paceBundle.Include("~/Content/admin/js/pace.min.js");
            paceBundle.Orderer = nullOrderer;
            bundles.Add(paceBundle);

            var jQueryBundle = new CustomScriptBundle("~/Bundles/Jquery",
                "http://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.11.1.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/jquery.validate.js",
                "~/Scripts/jquery.validate.unobtrusive.js",
                "~/Scripts/jquery.unobtrusive-ajax.js",
                "~/Scripts/knockout-3.*",
                "~/Scripts/knockout.mapping-*",
                "~/Scripts/bootstrap.js",
                "~/Scripts/bootbox.js",
                "~/Scripts/alerts.js",
                "~/Scripts/misc.js");

            commonScriptsBundle.Orderer = nullOrderer;
            bundles.Add(commonScriptsBundle);

            var adminScriptBundle = new CustomScriptBundle("~/Bundles/AdminScripts");
            adminScriptBundle.Include(
                "~/Content/admin/js/style.js",
                "~/Content/admin/js/misc.js",
                "~/Content/admin/js/jquery.metisMenu.js",
                "~/Content/admin/js/summernote.min.js",
                "~/Content/admin/js/intro.min.js",
                "~/Scripts/jquery.treegrid.js",
                "~/Scripts/moment-with-locales.js");
            adminScriptBundle.Orderer = nullOrderer;
            bundles.Add(adminScriptBundle);

            var oldBrowsersScriptBundle = new CustomScriptBundle("~/Bundles/OldBrowsers");
            oldBrowsersScriptBundle.Include("~/Scripts/respond.js");
            oldBrowsersScriptBundle.Orderer = nullOrderer;
            bundles.Add(oldBrowsersScriptBundle);

            BundleTable.EnableOptimizations = false;
        }
예제 #10
0
		public static void RegisterBundles(BundleCollection bundles)
		{
			BundleTable.EnableOptimizations = false;

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

			var styleTransformer = new StyleTransformer(new KryzhanovskyCssMinifier(), new ITranslator[] {new LessTranslator() })
			{
				CombineFilesBeforeMinification = true,
				UsePreMinifiedFiles = true
			};

			var styleSassTransformer = new StyleTransformer(new KryzhanovskyCssMinifier(), new ITranslator[] { new SassAndScssTranslator() })
			{
				CombineFilesBeforeMinification = true,
				UsePreMinifiedFiles = true
			};

			#region UnitGridSystem

			var styleUgsBundle = new CustomStyleBundle("~/unitgs/style");
			styleUgsBundle.Include("~/content/css/styleUgs.scss");
			styleUgsBundle.Transforms.Add(styleSassTransformer);
			styleUgsBundle.Builder = nullBuilder;
			styleUgsBundle.Orderer = nullOrderer;
			bundles.Add(styleUgsBundle);

			#endregion

			var styleBundle = new CustomStyleBundle("~/site/style");
			styleBundle.Include("~/content/css/site.less");
			styleBundle.Transforms.Add(styleTransformer);
			styleBundle.Builder = nullBuilder;
			styleBundle.Orderer = nullOrderer;
			bundles.Add(styleBundle);

			var sBtBundle = new CustomStyleBundle("~/site/sbootstrap");
			sBtBundle.Include("~/content/css/bootstrap/bootstrap.css",
				"~/content/css/ie10-viewport-bug-workaround.css");
			sBtBundle.Transforms.Add(styleTransformer);
			sBtBundle.Builder = nullBuilder;
			sBtBundle.Orderer = nullOrderer;
			bundles.Add(sBtBundle);

			var sGtBundle = new CustomStyleBundle("~/site/sgtreetable");
			sGtBundle.Include("~/content/css/gtreetable/bootstrap-gtreetable.css");
			sGtBundle.Transforms.Add(styleTransformer);
			sGtBundle.Builder = nullBuilder;
			sGtBundle.Orderer = nullOrderer;
			bundles.Add(sGtBundle);

			var sFancyTree = new CustomStyleBundle("~/site/sfancytree");
			sFancyTree.Include("~/content/css/fancytree/skin-bootstrap/ui.fancytree.css");
			sFancyTree.Transforms.Add(styleTransformer);
			sFancyTree.Builder = nullBuilder;
			sFancyTree.Orderer = nullOrderer;
			bundles.Add(sFancyTree);





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

			var jqUiBundel = new CustomScriptBundle("~/site/jqUi");
			jqUiBundel.Include("~/content/js/jq/ui/jquery-ui-{version}.js", "~/content/js/jq/browser/jquery.browser.js");
			jqUiBundel.Transforms.Add(jsTransformer);
			jqUiBundel.Orderer = nullOrderer;
			bundles.Add(jqUiBundel);

			var jBtBundle = new CustomScriptBundle("~/site/jbootstrap");
			jBtBundle.Include("~/content/js/bootstrap/bootstrap.js",
				"~/content/js/ie10-viewport-bug-workaround.js");
			jBtBundle.Transforms.Add(jsTransformer);
			jBtBundle.Orderer = nullOrderer;
			bundles.Add(jBtBundle);

			var jGtBundle = new CustomScriptBundle("~/site/jgtreetanle");
			jGtBundle.Include("~/content/js/gtreetable/bootstrap-gtreetable.js",
				"~/content/js/gtreetable/languages/bootstrap-gtreetable.ru.js");
			jGtBundle.Transforms.Add(jsTransformer);
			jGtBundle.Orderer = nullOrderer;
			bundles.Add(jGtBundle);

			var jqCkBundle = new CustomScriptBundle("~/site/jqCookie");
			jqCkBundle.Include("~/content/js/jq/cookie/jquery.cookie-{version}.js");
			jqCkBundle.Transforms.Add(jsTransformer);
			jqCkBundle.Orderer = nullOrderer;
			bundles.Add(jqCkBundle);

			var jqTsBundle = new CustomScriptBundle("~/site/jqToaster");
			jqTsBundle.Include("~/content/js/jq/toaster/jquery.toaster.js");
			jqTsBundle.Transforms.Add(jsTransformer);
			jqTsBundle.Orderer = nullOrderer;
			bundles.Add(jqTsBundle);

			var jqFancyTreeBundle = new CustomScriptBundle("~/site/jqFancyTree");
			jqFancyTreeBundle.Include("~/content/js/jq/fancytree/jquery.fancytree.js",
				"~/content/js/jq/fancytree/jquery.fancytree.glyph.js");
			jqFancyTreeBundle.Transforms.Add(jsTransformer);
			jqFancyTreeBundle.Orderer = nullOrderer;
			bundles.Add(jqFancyTreeBundle);
		}
예제 #11
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();

            // Admin panel styles 
            var adminPanelStylesBundle = new CustomStyleBundle("~/Bundles/AdminPanelStyles");
            adminPanelStylesBundle.Include(
                "~/Css/bootstrap.min.css",
                "~/Css/sb-admin.min.css",
                "~/font-awesome-4.1.0/css/font-awesome.min.css");
            adminPanelStylesBundle.Orderer = nullOrderer;
            bundles.Add(adminPanelStylesBundle);

            // Admin panel scripts 
            var adminPanelScriptsBundle = new CustomScriptBundle("~/Bundles/AdminPanelScripts");
            adminPanelScriptsBundle.Include(
                "~/Js/jquery-1.11.0.min.js",
                "~/Js/bootstrap.min.js");
            adminPanelScriptsBundle.Orderer = nullOrderer;
            bundles.Add(adminPanelScriptsBundle);

            //Admin panel widgets
            var widgetScriptsBundle = new CustomScriptBundle("~/Bundles/AdminPanelWidgets");
            widgetScriptsBundle.Include(
                "~/Js/jquery.simpleWeather.min.js",
                "~/Js/weather.min.js",
                "~/Js/clockwidget.min.js",
                "~/Js/underscore.min.js",
                "~/Js/moment-2.2.1.min.js",
                "~/Js/clndr.min.js",
                "~/Js/site.min.js");
            widgetScriptsBundle.Orderer = nullOrderer;
            bundles.Add(widgetScriptsBundle);

            // Website styles 
            var websiteStylesBundle = new CustomStyleBundle("~/Bundles/WebsiteStyles");
            websiteStylesBundle.Include(
                "~/Css/normalize.min.css",
                "~/Css/foundation.min.css",
                "~/Css/style.min.css",
                "~/Css/ie.min.css");
            websiteStylesBundle.Orderer = nullOrderer;
            bundles.Add(websiteStylesBundle);

            // Website scripts 
            var websiteScriptsBundle = new CustomScriptBundle("~/Bundles/WebsiteScripts");
            websiteScriptsBundle.Include(
                "~/Js/functions.min.js",
                "~/Js/custom.modernizr.min.js",
                "~/Js/headroom.min.js",
                "~/Js/foundation.min.js");
            websiteScriptsBundle.Orderer = nullOrderer;
            bundles.Add(websiteScriptsBundle);

            // Alertify styles 
            var websiteAlertifyStyleBundle = new CustomStyleBundle("~/Bundles/WebsiteAlertifyStyles");
            websiteAlertifyStyleBundle.Include(
                "~/Css/alertify.min.css",
                "~/Css/themes/default.min.css");
            websiteAlertifyStyleBundle.Orderer = nullOrderer;
            bundles.Add(websiteAlertifyStyleBundle);

            // Alertify script 
            var websiteAlertifyScriptsBundle = new CustomScriptBundle("~/Bundles/WebsiteAlertifyScripts");
            websiteAlertifyScriptsBundle.Include(
                "~/Js/alertify.min.js");
            websiteAlertifyScriptsBundle.Orderer = nullOrderer;
            bundles.Add(websiteAlertifyScriptsBundle);

            // Image crop style 
            var websiteCropStyleBundle = new CustomStyleBundle("~/Bundles/WebsiteCropStyles");
            websiteCropStyleBundle.Include(
                "~/Css/imgareaselect-animated.min.css");
            websiteCropStyleBundle.Orderer = nullOrderer;
            bundles.Add(websiteCropStyleBundle);

            // Image crop script 
            var websiteImageCropScriptsBundle = new CustomScriptBundle("~/Bundles/WebsiteImageCropScripts");
            websiteImageCropScriptsBundle.Include(
                "~/Js/jquery.imgareaselect.pack.min.js");
            websiteImageCropScriptsBundle.Orderer = nullOrderer;
            bundles.Add(websiteImageCropScriptsBundle);

            // Sortable tables script 
            var sortableScriptsBundle = new CustomScriptBundle("~/Bundles/SortableScripts");
            sortableScriptsBundle.Include(
                "~/Js/sorttable.min.js");
            sortableScriptsBundle.Orderer = nullOrderer;
            bundles.Add(sortableScriptsBundle);

            // WYSIWYG style 
            var alohaStyleBundle = new CustomStyleBundle("~/Bundles/AlohaStyles");
            alohaStyleBundle.Include(
                "~/Css/aloha-ui.min.css");
            alohaStyleBundle.Orderer = nullOrderer;
            bundles.Add(alohaStyleBundle);

            // WYSIWYG scripts 
            var alohaScriptsBundle = new CustomScriptBundle("~/Bundles/AlohaScripts");
            alohaScriptsBundle.Include(
                "~/Js/aloha.min.js",
                "~/Js/aloha-ui.min.js",
                "~/Js/aloha-ui-links.min.js");
            alohaScriptsBundle.Orderer = nullOrderer;
            bundles.Add(alohaScriptsBundle);
        }
        // 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 StyleTransformer();
            var jsTransformer = new ScriptTransformer();
            var nullOrderer = new NullOrderer();

            var cssBundle = new CustomStyleBundle("~/bundles/css");
            cssBundle.Include("~/Content/bootstrap/ems.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 emsscriptBundle = new CustomScriptBundle("~/bundles/emsscript");
            emsscriptBundle.Include("~/Scripts/ems.js");
            emsscriptBundle.Transforms.Add(jsTransformer);
            emsscriptBundle.Orderer = nullOrderer;
            bundles.Add(emsscriptBundle);


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

            var bootstrapDatePickerBundle = new CustomScriptBundle("~/bundles/bootstrapdatepicker");
            bootstrapDatePickerBundle.Include("~/Scripts/bootstrap-datepicker.js");
            bootstrapDatePickerBundle.Transforms.Add(jsTransformer);
            bootstrapDatePickerBundle.Orderer = nullOrderer;
            bundles.Add(bootstrapDatePickerBundle);

            var bootstrapDateTimePickerBundle = new CustomScriptBundle("~/bundles/bootstrapdatetimepicker");
            bootstrapDateTimePickerBundle.Include("~/Scripts/moment.js", "~/Scripts/bootstrap-datetimepicker.js");
            bootstrapDateTimePickerBundle.Transforms.Add(jsTransformer);
            bootstrapDateTimePickerBundle.Orderer = nullOrderer;
            bundles.Add(bootstrapDateTimePickerBundle);

            // 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);


        }