// For more information on Bundling, visit http://go.microsoft.com/fwlink/?LinkId=254725
        public static void RegisterBundles(BundleCollection bundles)
        {
            bundles.Add(new ScriptBundle("~/bundles/jquery").Include(
                        "~/Scripts/jquery-{version}.js"));

            bundles.Add(new ScriptBundle("~/bundles/js").Include(
                       "~/Scripts/bootstrap.js",
                       "~/Scripts/knockout-{version}.js",
                       "~/Scripts/knockout.mapping-latest.js",
                       "~/Scripts/underscore.js",
                       "~/Scripts/moment.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-*"));

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

            var typeScriptBundle = new ScriptBundle("~/bundles/ts")
                .IncludeDirectory("~/ViewModels", "*.ts", true);
            typeScriptBundle.Transforms.Add(new JsTransformer());
            bundles.Add(typeScriptBundle);
        }
Example #2
0
 public UserModelPkg()
 {
     Name = PackageName;
     ScriptBundle = new ScriptBundle("~/Scripts/Apps/shared/UserModel.min.js")
         .Include("~/Scripts/Apps/UserModel/UserModel.js");
     Category = Categories.Domain;
 }
Example #3
0
        private static ScriptBundle IncludeCommonComponentsScripts()
        {
            var bundle = new ScriptBundle("~/bundles/common-components");
            bundle.Include("~/Scripts/Components/*.js");

            return bundle;
        }
Example #4
0
		private static void IncludeSharedScripts(ScriptBundle jsBundle)
		{
			jsBundle.Include("~/Assets/Scripts/shared/bootbox.js");
			jsBundle.Include("~/Assets/Scripts/shared/head.js");
			jsBundle.Include("~/Assets/Scripts/shared/tagmanager.js");
			jsBundle.Include("~/Assets/Scripts/shared/toastr.js");
		}
        public static void RegisterBundles(BundleCollection bundles)
        {
            bundles.Add(new ScriptBundle("~/Bundles/js").Include(
                "~/scripts/jquery-{version}.js",
                "~/scripts/bootstrap.js"));

            var appBundle = new ScriptBundle("~/Bundles/app").Include(
               "~/scripts/angular.js",
                "~/scripts/angular-animate.js",
                "~/scripts/angular-messages.js",
                "~/scripts/angular-resource.js",
                "~/scripts/angular-route.js",
                "~/scripts/angular-sanitize.js",
                "~/scripts/angular-ui-router.js",
                "~/scripts/angular-ui/ui-bootstrap.js",
                "~/scripts/angular-ui/ui-bootstrap-tpls.js",
                "~/Scripts/html5shiv.js",
                "~/Scripts/respond.js",
                "~/scripts/ngToast.min.js",
                "~/scripts/ngToast.min.js");

            appBundle.Include(System.Configuration.ConfigurationManager.AppSettings["UseTestData"] == "true"
                ? "~/scripts/settings-test.js"
                : "~/scripts/settings-prod.js");

            appBundle.IncludeDirectory("~/app", "*.js", true);

            bundles.Add(appBundle);

            bundles.Add(new StyleBundle("~/Bundles/css").Include(
                "~/content/bootstrap.css",
                "~/content/bootstrap2-icons.css",
                "~/content/ngToast.min.css",
                "~/content/Site.css"));
        }
Example #6
0
        private static void AddAppBundles(BundleCollection bundles)
        {
            var scriptBundle = new ScriptBundle(ScriptsBundleVirtualPath);
#if (DEBUG && LOCAL)
            var adminAppDirFullPath = Path.Combine(HttpRuntime.AppDomainAppPath, AdminAppDir);

            // Create the .NET bundle, then use that list to generate an actual bundle.js file
            if (Directory.Exists(adminAppDirFullPath))
            {
                scriptBundle.Include(
                    // Order matters, so get the core app setup first
                    string.Format("~/{0}/app.core.module.js", AdminAppDir),
                    string.Format("~/{0}/app.module.js", AdminAppDir))
                    // then get any other top level js files
                    .IncludeDirectory(string.Format("~/{0}", AdminAppDir), "*.js", false)
                    // then get all nested module js files
                    .IncludeDirectory(string.Format("~/{0}", AdminAppDir), "*-module.js", true)
                    // finally, get all the other js files
                    .IncludeDirectory(string.Format("~/{0}", AdminAppDir), "*.js", true);

                bundles.Add(scriptBundle);

                // Generate a new bundle script.  This should only be done on a local box as running from the build server causes issues.
                GenerateBundleJS(scriptBundle, bundles);
            }
#elif (DEBUG && !LOCAL)
            scriptBundle.Include(string.Format("~/{0}/briandevlin.bundled.js", "scripts"));
            bundles.Add(scriptBundle);
#elif !DEBUG
            scriptBundle.Include(string.Format("~/{0}/briandevlin.bundled.js", "scripts"));
            bundles.Add(scriptBundle);
#endif
        }
Example #7
0
          private async static void GenerateBundleJS(ScriptBundle scriptBundle, BundleCollection bundles)
        {
            string bundleOutputPath = Path.Combine(HttpRuntime.AppDomainAppPath, BundleOutputFile);
            BundleContext context = new BundleContext(new HttpContextWrapper(HttpContext.Current), bundles, ScriptsBundleVirtualPath);
            System.Text.StringBuilder fileSpacer = new System.Text.StringBuilder();

            try
            {
                using (StreamWriter outputStream = new StreamWriter(bundleOutputPath))
                {
                    outputStream.BaseStream.Seek(0, SeekOrigin.End);
                    System.Collections.Generic.List<string> filePaths = PrepareFileList(scriptBundle.EnumerateFiles(context));

                    foreach (string filePath in filePaths)
                    {
                        string fileSpacerText = BuildFileSpacer(fileSpacer, filePath);

                        await outputStream.WriteAsync(fileSpacerText);

                        using (StreamReader jsFileStream = new StreamReader(filePath))
                        {
                            await outputStream.WriteAsync(await jsFileStream.ReadToEndAsync());
                        }
                    }
                }
            }
            catch (System.NullReferenceException nullEx)
            {
                string error = nullEx.Message;
            }
        }
Example #8
0
        public static void RegisterBundles(BundleCollection bundles)
        {
            var jquery = new ScriptBundle("~/bundles/jquery")
              .Include("~/Scripts/jquery-{version}.js",
                  "~/Scripts/jquery-ui-{version}.js");

              var bootstrapjs = new ScriptBundle("~/bundles/bootstrapjs")
              .Include("~/Scripts/bootstrap.js");

              var signalr = new ScriptBundle("~/bundles/signalr")
              .Include("~/Scripts/jquery.signalR-1.0.1.js");

              var chat = new ScriptBundle("~/bundles/chat")
              .Include("~/Scripts/chat.js");

              var jQueryUnobtrusiveValidation = new ScriptBundle("~/bundles/jQuery-unobtrusive-validation")
              .Include("~/Scripts/jquery.validate.js",
                  "~/Scripts/jquery.validate.unobtrusive.js");

              var account = new ScriptBundle("~/bundles/account")
              .Include("~/Scripts/account.js");

              bundles.Add(jquery);
              bundles.Add(bootstrapjs);
              bundles.Add(signalr);
              bundles.Add(chat);
              bundles.Add(jQueryUnobtrusiveValidation);
              bundles.Add(account);
        }
Example #9
0
        // For more information on bundling, visit http://go.microsoft.com/fwlink/?LinkId=301862
        public static void RegisterBundles(BundleCollection bundles)
        {
            bundles.Add(new ScriptBundle("~/bundles/jquery").Include(
                        "~/Scripts/jquery-{version}.js"));

            bundles.Add(new ScriptBundle("~/bundles/jqueryval").Include(
                        "~/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 ScriptBundle("~/bundles/bootstrap").Include(
                      "~/Scripts/bootstrap.js",
                      "~/Scripts/respond.js"));

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

            Bundle coffeeBundle = new ScriptBundle("~/bundles/coffee").Include(
                "~/Scripts/CoffeeScripts/TestingCoffee.coffee");
            coffeeBundle.Transforms.Insert(0,new CoffeeCompiler());
            bundles.Add(coffeeBundle);
        }
        public static void RegisterBundles(BundleCollection bundles)
        {
            {
                bundles.UseCdn = true;

                StyleBundle siteCSS = new StyleBundle("~/Content/siteCSS");
                siteCSS.Include("~/Content/navbar_style.css",
                  "~/Content/site_style.css");
                bundles.Add(siteCSS);

                StyleBundle bootstrapCSS = new StyleBundle("~/Content/bootstrapCSS", "//maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css");
                bootstrapCSS.Include("~/Content/bootstrap.min.css");
                bundles.Add(bootstrapCSS);

                StyleBundle fontawesomeCSS = new StyleBundle("~/Content/fontawesomeCSS", "//maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css");
                fontawesomeCSS.Include("~/Content/font-awesome.css");
                bundles.Add(fontawesomeCSS);

                ScriptBundle siteJS = new ScriptBundle("~/Scripts/siteJS");
                siteJS.Include("~/Scripts/jquery-2.1.4.min.js", "~/Scripts/bootstrap.min.js");
                bundles.Add(siteJS);

                BundleTable.EnableOptimizations = true;
            }
        }
Example #11
0
        public static void RegisterBundles(BundleCollection bundles)
        {
            var cssBundle = new StyleBundle("~/bundle/styles").IncludeDirectory("~/css/", "*.css");
            bundles.Add(cssBundle);

            var JQWidgetsBundle = new ScriptBundle("~/bundle/scripts/widgets").IncludeDirectory("~/scripts/JQwidgets/", "*.js");
            bundles.Add(JQWidgetsBundle);

            var VueComponents = new ScriptBundle("~/bundle/scripts/VUEComponents").IncludeDirectory("~/scripts/VUEComponents/", "*.js");
            VueComponents.Transforms.Clear();
            bundles.Add(VueComponents);

            var VueComponents2 = new ScriptBundle("~/bundle/scripts/VUE_Components").IncludeDirectory("~/scripts/Vue_Components/", "*.js");
            VueComponents2.Transforms.Clear();
            bundles.Add(VueComponents2);

            var jsCommon = new ScriptBundle("~/bundle/scripts/common");
            jsCommon.Transforms.Clear();
            jsCommon.Include(new string[]{

                 "~/scripts/common/moment.js",
                 "~/scripts/common/chart.js",
                 "~/scripts/common/materialize.js",
                 "~/scripts/common/velocity.js",
                 "~/scripts/common/vue.js",
                 "~/scripts/common/VueApp.js"
            });

            bundles.Add(jsCommon);
        }
Example #12
0
        private static void InitializeReports()
        {
            var logger = ObjectFactory.GetInstance<Logger>();
            logger.Trace("[Initialization].[Bundling].[Bootstrapper].[InitializeReports] invoked.");

            var path = BundleExtensions.GetScriptBundlePath(Content.Views.Reports.Index_aspx);
            var bundle = new ScriptBundle(path)
                .Include(managementScriptPaths)
                .Include(new []
                {
                    Content.Scripts.Reports.Index_js
                });
            BundleTable.Bundles.Add(bundle);

            path = BundleExtensions.GetStyleBundlePath(Content.Views.Reports.Index_aspx);
            bundle = new StyleBundle(path)
                .Include(managementStylePaths)
                .Include(new []
                {
                    Content.Styles.Reports.Index_css
                });
            BundleTable.Bundles.Add(bundle);

            logger.Debug("[Initialization].[Bundling].[Bootstrapper].[InitializeReports] finished work.");
        }
Example #13
0
        // Pour plus d'informations sur le regroupement, visitez http://go.microsoft.com/fwlink/?LinkId=301862
        public static void RegisterBundles(BundleCollection bundles)
        {
            bundles.Add(new ScriptBundle("~/bundles/jquery").Include(
                                    "~/Scripts/jquery-{version}.js",
                                    "~/Scripts/jquery-ui-{version}.js",
                                    "~/Scripts/jquery.ui.datepicker-fr.js",
                                    "~/Scripts/jquery.timepicker.js",
                                    "~/Scripts/jquery.datepair.js"));

            var jQueryValBundel = new ScriptBundle("~/bundles/jqueryval").Include(
                                    "~/Scripts/globalize/globalize.js",
                                    "~/Scripts/globalize/cultures/globalize.culture.fr-FR.js",
                                    "~/Scripts/jquery.validate.js",
                                    "~/Scripts/jquery.validate.globalize.js",
                                    "~/Scripts/jquery.validate.unobtrusive.js");
            jQueryValBundel.Orderer = new AsIsBundleOrderer();
            bundles.Add(jQueryValBundel);

            // Utilisez la version de développement de Modernizr pour le développement et l'apprentissage. Puis, une fois
            // prêt pour la production, utilisez l'outil de génération (bluid) sur http://modernizr.com pour choisir 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"));

            bundles.Add(new StyleBundle("~/Content/css").Include(
                                "~/Content/bootstrap-themes/bootstrap-yeti.css",
                                "~/Content/site.css",
                                "~/Content/jquery.timepicker.css"));
        }
Example #14
0
        // For more information on Bundling, visit http://go.microsoft.com/fwlink/?LinkId=254725
        public static void RegisterBundles(BundleCollection bundles)
        {
            var bundle = new ScriptBundle("~/bundles/jquery").Include(
                        "~/Scripts/jquery-{version}.js");
            bundle.Transforms.Add(new JsMinify());
            bundles.Add(bundle);

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

            bundles.Add(new ScriptBundle("~/bundles/categorygroup").Include(
                        "~/Scripts/category-group.js"));

            bundles.Add(new ScriptBundle("~/bundles/browser").Include(
                        "~/Scripts/browser.js"));

            bundles.Add(new ScriptBundle("~/bundles/site").Include(
                    "~/Scripts/site.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-*"));

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

            bundles.Add(new StyleBundle("~/Content/css").Include(
                      "~/Content/bootstrap.css",
                      "~/Content/site.css"));
        }
Example #15
0
        public static void RegisterBundles(BundleCollection bundles)
        {
            BundleTable.EnableOptimizations = true;
            Console.WriteLine("Registering SucroseBundle");
            var coreBundle = new ScriptBundle("~/Bundles/sucrose");
            var tsBundle = new Bundle("~/Bundles/typescript", new WrapperTransform());

            try
            {
                coreBundle.IncludeDirectory("~/Scripts/Sucrose", "*.js");
            }
            catch (ArgumentException)
            {
            }

            try
            {
                tsBundle.IncludeDirectory("~/TypeScript", "*.ts");
            }
            catch (ArgumentException)
            {
            }

            bundles.Add(coreBundle);
            bundles.Add(tsBundle);
        }
Example #16
0
        // For more information on bundling, visit http://go.microsoft.com/fwlink/?LinkId=301862
        public static void RegisterBundles(BundleCollection bundles)
        {
            var libs = new ScriptBundle("~/bundles/libs");

            libs.Include(
                "~/wwwroot/lib/jquery/dist/jquery.js",
                "~/wwwroot/lib/lodash/lodash.js",
                "~/wwwroot/lib/angular/angular.js",
                "~/wwwroot/lib/angular-ui-router/release/angular-ui-router.js",
                "~/wwwroot/lib/angular-bootstrap/ui-bootstrap-tpls.js",
                "~/wwwroot/lib/angular-local-storage/dist/angular-local-storage.js"
                );

            var app = new ScriptBundle("~/bundles/app");

            // Ensure the order is correct
            app.Include(
                "~/app/app.js",
                "~/app/Router.js"
                );

            app.IncludeDirectory("~/app/", "*.js", true);

            bundles.Add(libs);
            bundles.Add(app);
        }
        public static void RegisterBundles(BundleCollection bundles) {
            var jsBundle = new ScriptBundle("~/js").Include(
                "~/scripts/jquery-{version}.js",
                "~/scripts/bootstrap-{version}.js",
                "~/scripts/jquery.validate-1.13.0.js",
                "~/scripts/jquery-validate-bootstrap3-overrides.js",
                "~/scripts/syntax.js",
                "~/scripts/search.js"
                );
            bundles.Add(jsBundle);

            var desktopOnlyJsBundle = new ScriptBundle("~/desktopjs").Include(
                "~/scripts/skrollr.js",
                "~/scripts/visuals.js"
            );
            bundles.Add(desktopOnlyJsBundle);

            var lessBundle = new Bundle("~/css").Include(
                "~/content/bootstrap.css",
                "~/content/body.less",
                "~/content/bootstrap-theme.css"
            );

            lessBundle.Transforms.Add(new LessTransform());
            lessBundle.Transforms.Add(new CssMinify());
            bundles.Add(lessBundle);

        }
        public static void RegisterBundles(BundleCollection Bundles)
        {
            // Enable optimizations that remove whitespace and size of files without compromising functionality
            BundleTable.EnableOptimizations = true;

            // Login and sign up bundles
            ScriptBundle ScriptBundle = new ScriptBundle("~/bundles/js");
            StyleBundle StyleBundle = new StyleBundle("~/bundles/css");

            // Editor bundles for code editor in exercise view
            ScriptBundle EditorScripts = new ScriptBundle("~/bundles/editorjs");
            StyleBundle EditorStyles = new StyleBundle("~/bundles/editorcss");

            ScriptBundle.IncludeDirectory("~/Scripts/", "*.js");
            StyleBundle.IncludeDirectory("~/Content/", "*.css");

            EditorScripts.IncludeDirectory("~/Scripts/Editor/", "*.js");
            EditorStyles.IncludeDirectory("~/Content/Editor/", "*.css");
            EditorStyles.IncludeDirectory("~/Content/Editor/Themes/", "*.css");

            Bundles.Add(ScriptBundle);
            Bundles.Add(StyleBundle);

            Bundles.Add(EditorScripts);
            Bundles.Add(EditorStyles);
        }
Example #19
0
        private static void BundlingPostStart()
        {
            var jQueryBundle = new ScriptBundle("~/Scripts/jquery")
                .Include("~/Scripts/jquery-{version}.js");
            BundleTable.Bundles.Add(jQueryBundle);

            ScriptManager.ScriptResourceMapping.AddDefinition("jquery",
                new ScriptResourceDefinition
                {
                    Path = jQueryBundle.Path
                });

            var scriptBundle = new ScriptBundle("~/Scripts/all")
                .Include("~/Scripts/jquery-{version}.js")
                .Include("~/Scripts/jquery.validate.js")
                .Include("~/Scripts/jquery.validate.unobtrusive.js")
                .Include("~/Scripts/nugetgallery.js");
            BundleTable.Bundles.Add(scriptBundle);

            // Modernizr needs to be delivered at the top of the page but putting it in a bundle gets us a cache-buster.
            // TODO: Use minified modernizr!
            var modernizrBundle = new ScriptBundle("~/Scripts/modernizr")
                .Include("~/Scripts/modernizr-{version}.js");
            BundleTable.Bundles.Add(modernizrBundle);

            var stylesBundle = new StyleBundle("~/Content/css")
                .Include("~/Content/site.css");
            BundleTable.Bundles.Add(stylesBundle);

        }
Example #20
0
        public static void RegisterBundles(BundleCollection bundles)
        {
            var frontpageAll = new ScriptBundle("~/bundles/js");

            frontpageAll.Include("~/Scripts/lib/jquery-{version}.js")
                .Include(
                    "~/Scripts/lib/jquery.ui.core.js",
                    "~/Scripts/lib/jquery.ui.widget.js",
                    "~/Scripts/lib/jquery.ui.position.js",
                    "~/Scripts/lib/jquery.ui.dialog.js",
                    "~/Scripts/lib/jquery.ui.mouse.js",
                    "~/Scripts/lib/jquery.ui.sortable.js",
                    "~/Scripts/handlebars.js")
                .Include("~/Scripts/bootstrap.js")
                .IncludeDirectory("~/Scripts/frontpage", "*.js");

            var frontpage = new NontestBundle("~/bundles/frontpage", frontpageAll);
            var frontpageTest = new TestBundle("~/bundles/frontpage-test", frontpageAll);

            bundles.Add(frontpage);
            bundles.Add(frontpageTest);

            var southStreetTheme = new StyleBundle("~/Content/themes/south-street/all.css")
                .IncludeDirectory("~/Content/themes/south-street/", "*.css")
                .Include("~/Content/bootstrap.css");

            bundles.Add(southStreetTheme);
        }
        private static void RegisterAngularModule(this BundleCollection bundles, string bundleName, string moduleName, string cdn, string local)
        {
            var angularBundle = new ScriptBundle($"~/bundles/{bundleName}", cdn).Include(local);
            angularBundle.CdnFallbackExpression = $"(function() {{ try {{ window.angular.module('{moduleName}'); }} catch (e) {{ return false; }} return true; }})()";

            bundles.Add(angularBundle);
        }
Example #22
0
        public static void RegisterBundles(BundleCollection bundles)
        {
            var application = new ScriptBundle("~/bundles/application-js")
                .Include("~/Scripts/jquery-1.9.1.js")
                .Include("~/Scripts/es5-shim.js")
                .Include("~/Scripts/batman.js")
                .Include("~/Scripts/batman.jquery.js")
                .Include("~/Scripts/dashing.coffee")
                .Include("~/Scripts/gridster/jquery.leanModal.min.js")
                .Include("~/Scripts/jquery.knob.js")
                .Include("~/Scripts/d3.v2.min.js")
                .Include("~/Scripts/rickshaw.min.js")
                .Include("~/Scripts/gridster/jquery.gridster.js")
                .Include("~/Scripts/dashing.gridster.coffee")
                .IncludeDirectory("~/Widgets", "*.coffee", true)
                .Include("~/Scripts/application.coffee");
                            
            application.Transforms.Add(new CoffeeTransform());
            bundles.Add(application);

            var styles = new Bundle("~/bundles/application-css")
                .Include("~/Assets/stylesheets/font-awesome.css")
                .Include("~/Assets/stylesheets/jquery.gridster.css")
                .IncludeDirectory("~/Widgets", "*.scss", true)
                .Include("~/Assets/stylesheets/application.scss");

            styles.Transforms.Add(new ScssTransform());
            bundles.Add(styles);

            BundleTable.EnableOptimizations = true;
        }
        // For more information on bundling, visit http://go.microsoft.com/fwlink/?LinkId=301862
        public static void RegisterBundles(BundleCollection bundles)
        {
            bundles.IgnoreList.Clear();
            bundles.IgnoreList.Ignore("*.intellisense.js");
            bundles.IgnoreList.Ignore("*-vsdoc.js");
            bundles.IgnoreList.Ignore("*.debug.js", OptimizationMode.WhenEnabled);
            bundles.IgnoreList.Ignore("*.min.css", OptimizationMode.WhenDisabled);

            var scripts = new ScriptBundle("~/bundles/scripts")
                .Include("~/Scripts/jquery-{version}.js")
                .Include("~/Scripts/bootstrap.js")
                .Include("~/Scripts/knockout-{version}.js")
                .Include("~/Scripts/knockout.mapping-latest.js")
                .Include("~/Scripts/sugar.min.js")
                .Include("~/Scripts/accounting.min.js")
                .Include("~/Scripts/linq.min.js")
                .Include("~/Scripts/moment.min.js")
                .Include("~/Scripts/Common/customBindings.js")
                .Include("~/Scripts/stickyTableHeader.js");

            bundles.Add(scripts);

            bundles.Add(new StyleBundle("~/Content/css").Include(
                      "~/Content/bootstrap.css",
                      "~/Content/site.css",
                      "~/Content/upcoming-races.css",
                      "~/Content/current-race.css",
                      "~/Content/race-results.css",
                      "~/Content/standings.css"));

            // Set EnableOptimizations to false for debugging. For more information,
            // visit http://go.microsoft.com/fwlink/?LinkId=301862
            BundleTable.EnableOptimizations = true;
        }
        public static IHtmlString BundleAndRenderScript(this HtmlHelper helper, string path, params string[] urls)
        {
            var bundle = new ScriptBundle(path).Include(urls);
            BundleTable.Bundles.Add(bundle);

            return Scripts.Render(path);
        }
Example #25
0
    public static void RegisterBundles(BundleCollection bundles)
    {
      bundles.UseCdn = true;

      bundles.IgnoreList.Ignore("*.intellisense.js", OptimizationMode.Always);
      bundles.IgnoreList.Ignore("*.min.css", OptimizationMode.Always);
      bundles.IgnoreList.Ignore("*.map", OptimizationMode.Always);

      string cdnPath = new UriBuilder(CloudConfigurationManager.GetSetting("CdnStorageCdnUrl")).Host;

      bundles.Add(new StyleBundle("~/bundles/css/main")
        .Include("~/bower_components/bootstrap/dist/css/bootstrap.css")
        .Include("~/build/assets/stylesheets/site.css"));

      bundles.Add(new ScriptBundle("~/bundles/app").IncludeDirectory("~/Scripts/app", "*.js", true));

      var jqueryBundle = new ScriptBundle("~/bundles/jquery", "https://" + cdnPath + "/scripts/jquery/3.1.0/jquery.min.js")
                           .Include("~/bower_components/jquery/dist/jquery.js");
      jqueryBundle.CdnFallbackExpression = "jQuery";
      bundles.Add(jqueryBundle);

      var bootstrapBundle = new ScriptBundle("~/bundles/bootstrap", "https://" + cdnPath + "/scripts/bootstrap/3.3.7/bootstrap.min.js")
                      .Include("~/bower_components/bootstrap/dist/js/bootstrap.js");
      bootstrapBundle.CdnFallbackExpression = "window.jQuery && window.jQuery.fn && window.jQuery.fn.modal";
      bundles.Add(bootstrapBundle);
    }
        static void CreateScriptsBundles(BundleCollection bundles)
        {
            var scripts = new ScriptBundle("~/resources/scripts")
                .Include(
                    "~/Scripts/jquery-{version}.js",
                    "~/Scripts/jquery.validate.js",
                    "~/Scripts/jquery.validate.unobstrusive.js"
                );
            bundles.Add(scripts);

            scripts = new ScriptBundle("~/resources/angular")
                .Include(
                    "~/Scripts/angular.js",
                    "~/Scripts/angular-resource.js",
                    "~/Scripts/angular-sanitize.js",
                    "~/Scripts/i18n/angular-locale_de-de.js",
                    "~/Scripts/i18n/angular-locale_de.js",
                    "~/Scripts/jquery.signalR-1.*"
                );
            bundles.Add(scripts);
            scripts = new ScriptBundleWithoutRename("~/resources/sessionvoting")
                .Include(
                    "~/js/Transformations.js",
                    "~/js/VotingController.js",
                    "~/js/ResultController.js",
                    "~/js/SessionVotingServices.js",
                    "~/js/SessionVoting.js"
                );
            bundles.Add(scripts);
        }
Example #27
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);
        }
Example #28
0
        // For more information on bundling, visit http://go.microsoft.com/fwlink/?LinkId=301862
        public static void RegisterBundles(BundleCollection bundles)
        {
            bundles.Add(new ScriptBundle("~/bundles/jquery").Include(
                        "~/Scripts/jquery-{version}.js"));

            bundles.Add(new ScriptBundle("~/bundles/jqueryval").Include(
                        "~/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 ScriptBundle("~/bundles/bootstrap").Include(
                      "~/Scripts/bootstrap.js"));

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

            var reactBundle = new ScriptBundle("~/bundles/reactjs").Include(
                "~/scripts/react/react.js",
                "~/scripts/react/react-dom.js");

            bundles.Add(reactBundle);
        }
		// For more information on bundling, visit http://go.microsoft.com/fwlink/?LinkId=301862
		public static void RegisterBundles(BundleCollection bundles)
		{
			bundles.Add(new ScriptBundle("~/bundles/jqueryval").Include(
						"~/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-*"));


			var bundle = new ScriptBundle("~/bundles/app")
			{
				Orderer = new CompositionRootJsLastOrderer()
			};
			bundle.Include(
				"~/Scripts/jquery-{version}.js",
				"~/Scripts/jquery.signalr-{version}.js",
				"~/Scripts/underscore.js",
				"~/Scripts/moment.js",
				"~/Scripts/bootstrap.js",
				"~/Scripts/angular.js",
				"~/Scripts/LogR.js",
				"~/Scripts/jMess.js",
				"~/Scripts/respond.js",
				"~/App/*.js");
			bundles.Add(bundle);

			bundles.Add(new StyleBundle("~/Content/css").Include(
					  "~/Content/bootstrap.css",
					  "~/Content/site.css"));
		}
        // For more information on bundling, visit http://go.microsoft.com/fwlink/?LinkId=301862
        public static void RegisterBundles(BundleCollection bundles)
        {
            #region js
            bundles.Add(new ScriptBundle("~/bundles/jquery").Include(
                            "~/Scripts/jquery-{version}.js"));

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

            bundles.Add(new ScriptBundle("~/bundles/modernizr").Include(
                        "~/Scripts/modernizr-*"));

            var bootstrap = new ScriptBundle("~/bundles/bootstrap").Include(
                      "~/Scripts/bootstrap.js",
                      "~/Scripts/respond.js");
            bootstrap.Orderer = new AsIsBundleOrderer();
            bundles.Add(bootstrap);
            #endregion

            #region css
            var css = new StyleBundle("~/Content/css").Include(
                         "~/Content/bootstrap.css",
                        "~/Content/bootstrap-theme.css",
                         "~/Content/site.css");
            css.Orderer = new AsIsBundleOrderer();
            bundles.Add(css);
            #endregion

            #if DEBUG
            BundleTable.EnableOptimizations = false;
            #else
            BundleTable.EnableOptimizations = true;
            #endif
        }
        public static void RegisterBundles(BundleCollection bundles)
        {
            var scriptBundle = new ScriptBundle(DEFAULT_SCRIPTS_BUNDLE)
                               .Include(
                "~/Themes/Default/Scripts/jquery-{version}.js",
                "~/Themes/Default/Scripts/jquery.validate.js",
                "~/Themes/Default/Scripts/MicrosoftMvcJQueryValidation.js",
                "~/Themes/Default/Scripts/knockout-{version}.js",
                "~/Themes/Default/Scripts/underscore.js",
                "~/Themes/Default/Scripts/amplify.js",
                "~/Themes/Default/Scripts/punycode.js")
                               .Include(
                "~/Themes/Default/Scripts/atomia/AtomiaValidation.js",
                "~/Themes/Default/Scripts/atomia/AtomiaAntiForgery.js",
                "~/Themes/Default/Scripts/atomia/atomia.utils.js",
                "~/Themes/Default/Scripts/atomia/atomia.utils.eventhandlers.js",
                "~/Themes/Default/Scripts/atomia/atomia.api.definitions.js",
                "~/Themes/Default/Scripts/atomia/atomia.api.cart.js",
                "~/Themes/Default/Scripts/atomia/atomia.api.checkout.js",
                "~/Themes/Default/Scripts/atomia/atomia.api.domains.js",
                "~/Themes/Default/Scripts/atomia/atomia.ko.submitvalid-binding.js",
                "~/Themes/Default/Scripts/atomia/atomia.ko.validatecustomfield.js",
                "~/Themes/Default/Scripts/atomia/atomia.ko.validatedomain.js",
                "~/Themes/Default/Scripts/atomia/atomia.ko.slidevisible-binding.js",
                "~/Themes/Default/Scripts/atomia/atomia.ko.vpsslider-binding.js",
                "~/Themes/Default/Scripts/atomia/atomia.viewmodels.modalmixin.js",
                "~/Themes/Default/Scripts/atomia/atomia.viewmodels.productmixin.js",
                "~/Themes/Default/Scripts/atomia/atomia.viewmodels.notification.js",
                "~/Themes/Default/Scripts/atomia/atomia.viewmodels.noriddeclaration.js",
                "~/Themes/Default/Scripts/atomia/atomia.viewmodels.languageselector.js",
                "~/Themes/Default/Scripts/atomia/atomia.viewmodels.currencyselector.js",
                "~/Themes/Default/Scripts/atomia/atomia.viewmodels.cart.js",
                "~/Themes/Default/Scripts/atomia/atomia.viewmodels.campaign.js",
                "~/Themes/Default/Scripts/atomia/atomia.viewmodels.progress.js",
                "~/Themes/Default/Scripts/atomia/atomia.viewmodels.domainconnection.js",
                "~/Themes/Default/Scripts/atomia/atomia.viewmodels.domains.js",
                "~/Themes/Default/Scripts/atomia/atomia.viewmodels.domainregistration.js",
                "~/Themes/Default/Scripts/atomia/atomia.viewmodels.domainmove.js",
                "~/Themes/Default/Scripts/atomia/atomia.viewmodels.productlisting.js",
                "~/Themes/Default/Scripts/atomia/atomia.viewmodels.account.js",
                "~/Themes/Default/Scripts/atomia/atomia.viewmodels.whois.js",
                "~/Themes/Default/Scripts/atomia/atomia.viewmodels.paymentselector.js",
                "~/Themes/Default/Scripts/atomia/atomia.viewmodels.paywithinvoice.js",
                "~/Themes/Default/Scripts/atomia/atomia.viewmodels.paymentprofile.js",
                "~/Themes/Default/Scripts/atomia/atomia.viewmodels.vatvalidation.js",
                "~/Themes/Default/Scripts/atomia/atomia.viewmodels.vpscalculator.js",
                "~/Themes/Default/Scripts/atomia/atomia.viewmodels.checkout.js");

            var styleBundle = new StyleBundle(DEFAULT_STYLES_BUNDLE)
                              .Include(
                "~/Themes/Default/Content/css/atomia_2/style.css");

            bundles.Add(scriptBundle);
            bundles.Add(styleBundle);
        }
Example #32
0
        // For more information on bundling, visit https://go.microsoft.com/fwlink/?LinkId=301862
        public static void RegisterBundles(BundleCollection bundles)
        {
            bundles.Add(new StyleBundle("~/bundles/css").Include(
                            "~/Content/bootstrap.css",
                            "~/Content/site.css"
                            ));

            // same as above but with IncludeDirectory() instead of include
            bundles.Add(new StyleBundle("~/bundles/css").IncludeDirectory("~/Content/", "*.css", true));

            // Add ScriptBundle here...

            // Load files from CDN
            var cdnPath = "http://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.7.1.min.js";

            bundles.Add(new ScriptBundle("~/bundles/jquery", cdnPath)
                        .Include("~/Scripts/jquery-{version}.js"));
            // Create an object of ScriptBundle and
            // specify bundle name (as virtual path) as constructor parameter

            ScriptBundle scriptBndl = new ScriptBundle("~/bundles/bootstrap");

            // use Include() method to add all the script files with their paths
            scriptBndl.Include(
                "~/Scripts/bootstrap.js",
                "~/Scripts/respond.js"
                );

            // IncludeDirectory() method of bundle class to add files under particular directory
            bundles.Add(new ScriptBundle("~/bundles/scripts").IncludeDirectory("~/Scripts/", "*.js", true));

            // Add the bundle into BundleCollection
            bundles.Add(scriptBndl);

            BundleTable.EnableOptimizations = true;

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

            bundles.Add(new ScriptBundle("~/bundles/jqueryval").Include(
                            "~/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 https://modernizr.com to pick only the tests you need.
            bundles.Add(new ScriptBundle("~/bundles/modernizr").Include(
                            "~/Scripts/modernizr-*"));

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

            bundles.Add(new StyleBundle("~/Content/css").Include(
                            "~/Content/bootstrap.css",
                            "~/Content/site.css"));
        }
Example #33
0
        /// <summary>
        /// Creates and adds JavaScript bundles to the bundle collection. Content Delivery Network's (CDN) are used
        /// where available.
        ///
        /// Note: MVC's built in <see cref="System.Web.Optimization.Bundle.CdnFallbackExpression"/> is not used as
        /// using in-line scripts is not permitted under Content Security Policy (CSP) (See <see cref="FilterConfig"/>
        /// for more details).
        ///
        /// Instead, we create our own fail-over bundles. If a CDN is not reachable, the fail-over script loads the
        /// local bundles instead. The fail-over script is only a few lines of code and should have a minimal impact,
        /// although it does add an extra request (Two if the browser is IE8 or less). If you feel confident in the CDN
        /// availability and prefer better performance, you can delete these lines.
        /// </summary>
        /// <param name="bundles">The bundles.</param>
        private static void AddJavaScript(BundleCollection bundles)
        {
            // jQuery - The JavaScript helper API (http://jquery.com/).
            Bundle jqueryBundle = new ScriptBundle("~/bundles/jquery", ContentDeliveryNetwork.Google.JQueryUrl)
                                  .Include("~/Scripts/jquery-{version}.js");

            bundles.Add(jqueryBundle);

            // jQuery Validate - Client side JavaScript form validation (http://jqueryvalidation.org/).
            Bundle jqueryValidateBundle = new ScriptBundle(
                "~/bundles/jqueryval",
                ContentDeliveryNetwork.Microsoft.JQueryValidateUrl)
                                          .Include("~/Scripts/jquery.validate*");

            bundles.Add(jqueryValidateBundle);

            // Microsoft jQuery Validate Unobtrusive - Validation using HTML data- attributes
            // http://stackoverflow.com/questions/11534910/what-is-jquery-unobtrusive-validation
            Bundle jqueryValidateUnobtrusiveBundle = new ScriptBundle(
                "~/bundles/jqueryvalunobtrusive",
                ContentDeliveryNetwork.Microsoft.JQueryValidateUnobtrusiveUrl)
                                                     .Include("~/Scripts/jquery.validate*");

            bundles.Add(jqueryValidateUnobtrusiveBundle);

            // Modernizr - Allows you to check if a particular API is available in the browser (http://modernizr.com).
            // 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.
            // Note: The current version of Modernizr does not support Content Security Policy (CSP) (See FilterConfig).
            // See here for details: https://github.com/Modernizr/Modernizr/pull/1263 and
            // http://stackoverflow.com/questions/26532234/modernizr-causes-content-security-policy-csp-violation-errors
            Bundle modernizrBundle = new ScriptBundle(
                "~/bundles/modernizr",
                ContentDeliveryNetwork.Microsoft.ModernizrUrl)
                                     .Include("~/Scripts/modernizr-*");

            bundles.Add(modernizrBundle);

            // Bootstrap - Twitter Bootstrap JavaScript (http://getbootstrap.com/).
            Bundle bootstrapBundle = new ScriptBundle(
                "~/bundles/bootstrap",
                ContentDeliveryNetwork.Microsoft.BootstrapUrl)
                                     .Include("~/Scripts/bootstrap.js");

            bundles.Add(bootstrapBundle);

            // Script bundle for the site. The fall-back scripts are for when a CDN fails, in this case we load a local
            // copy of the script instead.
            Bundle failoverCoreBundle = new ScriptBundle("~/bundles/site")
                                        .Include("~/Scripts/Fallback/styles.js")
                                        .Include("~/Scripts/Fallback/scripts.js")
                                        .Include("~/Scripts/site.js");

            bundles.Add(failoverCoreBundle);
        }
Example #34
0
        public static void RegisterBundles(BundleCollection bundles)
        {
            var styleBundle  = new StyleBundle("~/Content/DevExtremeBundle");
            var scriptBundle = new ScriptBundle("~/Scripts/DevExtremeBundle");

            // Uncomment to use the Gantt control
            //styleBundle.Include("~/Content/dx-gantt.css");

            // Uncomment to use the Diagram control
            //styleBundle.Include("~/Content/dx-diagram.css");

            styleBundle.Include("~/Content/dx.common.css");

            // Predefined themes: https://js.devexpress.com/DevExtreme/Guide/Themes_and_Styles/Predefined_Themes/
            styleBundle.Include("~/Content/dx.light.css");

            // Uncomment to use the Gantt control
            //scriptBundle.Include("~/Scripts/dx-gantt.js");

            // Uncomment to use the Diagram control
            //scriptBundle.Include("~/Scripts/dx-diagram.js");

            scriptBundle.Include("~/Scripts/jquery-2.1.3.js");

            // Uncomment to use Globalize for localization
            // Docs: https://docs.devexpress.com/DevExtremeAspNetMvc/400706#globalize
            //scriptBundle.Include("~/Scripts/cldr.js");
            //scriptBundle.Include("~/Scripts/cldr/event.js");
            //scriptBundle.Include("~/Scripts/cldr/supplemental.js");
            //scriptBundle.Include("~/Scripts/cldr/unresolved.js");
            //scriptBundle.Include("~/Scripts/globalize.js");
            //scriptBundle.Include("~/Scripts/globalize/message.js");
            //scriptBundle.Include("~/Scripts/globalize/number.js");
            //scriptBundle.Include("~/Scripts/globalize/currency.js");
            //scriptBundle.Include("~/Scripts/globalize/date.js");

            // Uncomment to enable client-side export
            //scriptBundle.Include("~/Scripts/jszip.js");

            scriptBundle.Include("~/Scripts/dx.all.js");

            // Uncomment to provide geo-data for the VectorMap control
            // Docs: https://js.devexpress.com/DevExtreme/Guide/Widgets/VectorMap/Providing_Data/#Data_for_Areas
            //scriptBundle.Include("~/Scripts/vectormap-data/world.js");

            scriptBundle.Include("~/Scripts/aspnet/dx.aspnet.mvc.js");
            scriptBundle.Include("~/Scripts/aspnet/dx.aspnet.data.js");

            bundles.Add(styleBundle);
            bundles.Add(scriptBundle);

#if !DEBUG
            BundleTable.EnableOptimizations = true;
#endif
        }
        public static void RegisterBundles(BundleCollection bundles)
        {
            // jQuery
            var jqueryUiCss = new StyleBundle("~/bundles/jqueryuicss").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");

            jqueryUiCss.Transforms.Add(new CssMinify());
            bundles.Add(jqueryUiCss);

            var jqueryJs = new ScriptBundle("~/bundles/jquery").Include(
                "~/Scripts/jquery-1.*",
                "~/Scripts/jquery-ui*");

            jqueryJs.Transforms.Add(new JsMinify());
            bundles.Add(jqueryJs);

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

            jqueryVal.Transforms.Add(new JsMinify());
            bundles.Add(jqueryVal);

            // Default
            var defaultCss = new StyleBundle("~/bundles/css").Include(
                "~/Content/less/bootstrap.less",
                "~/Content/less/responsive.less",
                "~/Content/Prettify/prettify.css",
                "~/Content/docs.css");

            defaultCss.Transforms.Add(new LessMinify());
            //defaultCss.Transforms.Add(new CssMinify());
            bundles.Add(defaultCss);

            var defaultJs = new ScriptBundle("~/bundles/js").Include(
                "~/Scripts/bootstrap.js",
                "~/Scripts/Prettify/prettify.js",
                "~/Scripts/application.js");

            defaultJs.Transforms.Add(new JsMinify());
            bundles.Add(defaultJs);

            BundleTable.EnableOptimizations = true;
        }
Example #36
0
        public static void RegisterBundles(BundleCollection bundles)
        {
            bundles.Add(new ScriptBundle("~/bundles/jquery").Include(
                            "~/Scripts/jquery-{version}.js"));

            var bundle = new ScriptBundle("~/bundles/jqueryval").Include(
                "~/Scripts/globalize/globalize.js",
                "~/Scripts/jquery.validate.js",
                "~/Scripts/jquery.validate.unobtrusive.js",
                "~/Scripts/jquery.validate.globalize.js",
                "~/Scripts/globalize/cultures/globalize.culture.pt-BR.js");

            bundle.Orderer = new NonOrderingBundleOrderer();
            bundles.Add(bundle);

            bundles.Add(new ScriptBundle("~/bundles/modernizr").Include(
                            "~/Scripts/modernizr-*"));

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

            bundles.Add(new ScriptBundle("~/bundles/jqueryajax").Include(
                            "~/Scripts/jquery.unobtrusive-ajax.custom.js",
                            "~/Scripts/jquery.unobtrusive-ajax*"));

            bundles.Add(new StyleBundle("~/Theme/css").Include(
                            "~/App_Themes/Default/css/bootstrap.min.css",
                            "~/App_Themes/Default/css/bootstrap-theme.min.css",
                            "~/App_Themes/Default/css/site.css",
                            "~/Content/jquery-chosen/chosen.min.css"));

            bundles.Add(new StyleBundle("~/Content/jqueryui").Include(
                            "~/Content/jquery-ui/jquery-ui.min.css",
                            "~/Content/jquery-ui/jquery-ui.structure.min.css",
                            "~/Content/jquery-ui/jquery-ui.theme.min.css"));

            bundles.Add(new ScriptBundle("~/bundles/jqueryui").Include(
                            "~/Scripts/jquery-ui/jquery-ui.min.js",
                            "~/Scripts/jquery-ui/datepicker-pt-BR.js"));

            bundles.Add(new ScriptBundle("~/bundles/jqueryplugin").Include(
                            "~/Scripts/jquery.mask.js",
                            "~/Scripts/jquery.columns.paginator.js",
                            "~/Scripts/jquery.columns.js",
                            "~/Scripts/mustache.js",
                            "~/Scripts/mustache-wax.js",
                            "~/Scripts/jquery-chosen/chosen.jquery.min.js",
                            "~/Scripts/bootbox.js",
                            "~/Scripts/maskedinput-binder.js"));

            bundles.Add(new ScriptBundle("~/bundles/jquery-js-utils").Include(
                            "~/Scripts/util.js",
                            "~/Scripts/ajax.utils.js"));
        }
Example #37
0
        // For more information on bundling, visit http://go.microsoft.com/fwlink/?LinkId=301862
        public static void RegisterBundles(BundleCollection bundles)
        {
            var oPlugins = new ScriptBundle("~/bundles/plugins")
                           .Include("~/wwwroot/plugins/jquery-2.1.4.min.js",
                                    "~/wwwroot/plugins/jquery.easing.1.3.js",
                                    "~/wwwroot/plugins/jquery.cookie.js",
                                    "~/wwwroot/plugins/jquery.appear.js",
                                    "~/wwwroot/plugins/jquery.isotope.js",
                                    "~/wwwroot/plugins/bootstrap/js/bootstrap.min.js");

            bundles.Add(oPlugins);

            bundles.Add(new ScriptBundle("~/bundles/unobtrusive")
                        .Include("~/wwwroot/plugins/jquery/jquery.unobtrusive-ajax.min.js"));

            bundles.Add(new ScriptBundle("~/bundles/datepicker")
                        .Include("~/wwwroot/plugins/bootstrap-datepicker/js/bootstrap-datepicker.js"));

            bundles.Add(new ScriptBundle("~/bundles/mask")
                        .Include("~/wwwroot/plugins/jquery-mask/jquery.mask.js"));

            var oJqueryval = new ScriptBundle("~/bundles/jqueryval")
                             .Include("~/wwwroot/plugins/jquery-validation/jquery.validate-vsdoc.js",
                                      "~/wwwroot/plugins/jquery-validation/jquery.validate.js",
                                      "~/wwwroot/plugins/jquery-validation/additional-methods.js",
                                      "~/wwwroot/plugins/jquery-validation/jquery.validate.unobtrusive.min.js",
                                      "~/wwwroot/plugins/globalize/globalize.js",
                                      "~/wwwroot/plugins/globalize/cultures/globalize.culture.pt-BR.js",
                                      "~/wwwroot/plugins/jquery-validation/jquery.validate.globalize.js",
                                      "~/wwwroot/js/pt-Br.js");

            oJqueryval.Orderer = new AsIsBundleOrderer();
            bundles.Add(oJqueryval);

            var oHighcharts = new ScriptBundle("~/bundles/highcharts")
                              .Include("~/wwwroot/plugins/highcharts/highcharts.js",
                                       "~/wwwroot/plugins/highcharts/highcharts_pt-Br.js",
                                       "~/wwwroot/plugins/highcharts/highcharts-3d.js");

            //"~/wwwroot/plugins/highcharts/exporting.js");

            oHighcharts.Orderer = new AsIsBundleOrderer();
            bundles.Add(oHighcharts);

            var oDatetimepicker = new ScriptBundle("~/bundles/datetimepicker")
                                  .Include("~/wwwroot/plugins/moment/moment.min.js",
                                           "~/wwwroot/plugins/bootstrap-datetimepicker/js/pt-br.js",
                                           "~/wwwroot/plugins/bootstrap-datepicker/js/bootstrap-datepicker.js",
                                           "~/wwwroot/plugins/bootstrap-datetimepicker/js/bootstrap-datetimepicker.min.js");

            oDatetimepicker.Orderer = new AsIsBundleOrderer();
            bundles.Add(oDatetimepicker);

            BundleTable.EnableOptimizations = false;
        }
Example #38
0
        public void AssetIsTransformedToIncludeModulePathInDefineCallWithNoDependencies()
        {
            var asset  = new StubAsset("~/test.js", "define(function(){})");
            var bundle = new ScriptBundle("~");

            var module = new AnonymousModule(asset, bundle);

            var output = asset.OpenStream().ReadToEnd();

            output.ShouldEqual("define(\"test\",function(){})");
        }
        public static void RegisterScriptBundles(BundleCollection bundles)
        {
            const string ANGULAR_APP_ROOT    = "~/Client/scripts/app/";
            const string VIRTUAL_BUNDLE_PATH = ANGULAR_APP_ROOT + "main.js";

            var scriptBundle = new ScriptBundle(VIRTUAL_BUNDLE_PATH)
                               .Include(ANGULAR_APP_ROOT + "app.js")
                               .IncludeDirectory(ANGULAR_APP_ROOT, "*.js", searchSubdirectories: true);

            bundles.Add(scriptBundle);
        }
Example #40
0
        public void GivenTwoBundlesWithSamePathButDifferentType_WhenReferenceThePath_ThenBothBundlesAreReferenced()
        {
            var bundle1 = new ScriptBundle("~/test");
            var bundle2 = new StylesheetBundle("~/test");

            bundleContainer.Setup(c => c.FindBundlesContainingPath("~/test"))
            .Returns(new Bundle[] { bundle1, bundle2 });

            builder.Reference("~/test");
            builder.GetBundles(null).Count().ShouldEqual(2);
        }
Example #41
0
        protected virtual ScriptBundle CreateScriptBundle(string virtualPath)
        {
            var bundle = new ScriptBundle(virtualPath);

            if (!Minify)
            {
                bundle.Transforms.Clear();
            }

            return(bundle);
        }
Example #42
0
        public void GivenTwoBundlesWithSamePathButDifferentTypes_WhenGetPathWithType_ThenBundleMatchinTheTypeIsReturned()
        {
            var scriptBundle = new ScriptBundle("~/test");

            bundles.Add(scriptBundle);
            bundles.Add(new StylesheetBundle("~/test"));

            var bundle = bundles.Get <ScriptBundle>("~/test");

            bundle.ShouldBeSameAs(scriptBundle);
        }
Example #43
0
        public static void RegisterBundles(BundleCollection bundles)
        {
            ScriptBundle thirdPartyScripts = new ScriptBundle("~/Scripts/ThirdParty");

            thirdPartyScripts.Include("~/Scripts/jquery-{version}.js")
            .Include("~/Scripts/bootstrap.min.js")
            .Include("~/Scripts/validate.min.js");

            bundles.Add(thirdPartyScripts);
            BundleTable.EnableOptimizations = true;
        }
Example #44
0
        private static ScriptBundle GetScriptBundle(string bundleName, params string[] jsFiles)
        {
            ScriptBundle jsBundle = new ScriptBundle(bundleName);

            foreach (var jsFile in jsFiles)
            {
                jsBundle.Include(jsFile.ToAppRelativeUrl());
            }
            jsBundle.Orderer = new CustomOrderer();
            return(jsBundle);
        }
        private static void AddAngularScriptBundles(BundleCollection bundles)
        {
            var bundle = new ScriptBundle("~/bundles/angular").Include(
                "~/Scripts/angular/angular.js",
                "~/Scripts/angular-route.js",
                "~/Scripts/angular-animate/angular-animate.js",
                "~/Scripts/angular-aria/angular-aria.js",
                "~/Scripts/angular-material/angular-material.js");

            bundles.Add(bundle);
        }
Example #46
0
        public void AssetIsWrappedInDefineCall()
        {
            var asset  = new StubAsset("~/test.js", "var test = {};");
            var bundle = new ScriptBundle("~");

            var module = new PlainScript(asset, bundle, modules.Object);

            var output = asset.OpenStream().ReadToEnd();

            output.ShouldEqual("define(\"test\",[],function(){var test = {};\r\nreturn test;});");
        }
Example #47
0
        public void WhenAddReferenceToBundleDirectoryWithLocation_ThenGetBundlesThatLocationReturnTheBundle()
        {
            var bundle = new ScriptBundle("~/test");

            bundle.PageLocation = "body";
            AddBundles(bundle);

            builder.Reference("test", null);

            builder.GetBundles("body").First().ShouldBeSameAs(bundle);
        }
Example #48
0
        public void GivenScriptHasNoTopLevelVarOrReturnExpressionThenDefineHasNoReturn()
        {
            var asset  = new StubAsset("~/test.js");
            var bundle = new ScriptBundle("~");

            var module = new PlainScript(asset, bundle, modules.Object);

            var output = asset.OpenStream().ReadToEnd();

            output.ShouldEqual("define(\"test\",[],function(){\r\n});");
        }
Example #49
0
        // For more information on Bundling, visit http://go.microsoft.com/fwlink/?LinkId=254725
        public static void RegisterBundles(BundleCollection bundles)
        {
            SetupIgnorePatterns(bundles.IgnoreList);

            bundles.Add(new StyleBundle("~/Content/kendoui/css")
                        .Include("~/Content/KendoUI/kendo.common.min.css", "~/Content/KendoUI/kendo.default.min.css"));

            Bundle bootstrapBundle = new StyleBundle("~/Content/bootstrap/css/styles");

            bootstrapBundle.Include("~/Content/bootstrap/css/bootstrap.css", "~/Content/bootstrap/css/bootstrap-responsive.css");
            bundles.Add(bootstrapBundle);

            Bundle flattyBundle = new StyleBundle("~/Content/flatty/stylesheets/styles");

            flattyBundle.Include("~/Content/flatty/stylesheets/dark-theme.css", "~/Content/flatty/stylesheets/theme-colors.css", "~/Content/flatty/stylesheets/plugins/tabdrop/tabdrop.css");
            bundles.Add(flattyBundle);

            Bundle cssBundle = new StyleBundle("~/Content/css/styles");

            cssBundle.IncludeDirectory("~/Content/css", "*.css");
            cssBundle.IncludeDirectory("~/Content", "*.css");
            bundles.Add(cssBundle);

            Bundle lessBundle = new Bundle("~/Content/less", new LessMinify());

            lessBundle.Include("~/Content/Site.less");
            bundles.Add(lessBundle);

            Bundle scriptBundle = new ScriptBundle("~/bundles/scripts");

            scriptBundle.Include("~/Scripts/jquery-{version}.js");
            scriptBundle.Include("~/Scripts/knockout-{version}.js");
            scriptBundle.Include("~/Scripts/knockout.mapping-latest.js");
            scriptBundle.Include("~/Scripts/knockout.validation.js");
            scriptBundle.Include("~/Scripts/kendo.web.min.js");
            scriptBundle.Include("~/Scripts/knockout-kendo.min.js");
            scriptBundle.Include("~/Scripts/jquery.history.js");
            scriptBundle.Include("~/Scripts/moment.js");
            scriptBundle.Include("~/Scripts/signals.min.js");
            scriptBundle.Include("~/Scripts/crossroads.min.js");
            scriptBundle.Include("~/Content/bootstrap/js/bootstrap.js");
            scriptBundle.Include("~/Scripts/select2.js");
            scriptBundle.Include("~/Content/flatty/javascripts/plugins/mobile_events/jquery.mobile-events.min.js");
            scriptBundle.Include("~/Content/flatty/javascripts/jquery/jquery-migrate.min.js");
            scriptBundle.Include("~/Content/flatty/javascripts/nav.js");
            scriptBundle.Include("~/Content/flatty/javascripts/plugins/tabdrop/bootstrap-tabdrop.js");
            scriptBundle.Include("~/Scripts/toastr.js");
            scriptBundle.IncludeDirectory("~/App/Global", "*.js", true);
            scriptBundle.IncludeDirectory("~/App", "*.js", true);
            bundles.Add(scriptBundle);

            // Uncomment to see release configuration bundling.
            //BundleTable.EnableOptimizations = true;
        }
        static void GetJSForPartials(BundleCollection bundles)
        {
            //script para a view Views/Employee
            ScriptBundle scripts = new ScriptBundle("~/Scripts/EmployeeJS");

            scripts.Include("~/Scripts/App.Employee.js");
            bundles.Add(scripts);
            scripts = new ScriptBundle("~/Scripts/OccupationJS");
            scripts.Include("~/Scripts/App.Occupation.js");
            bundles.Add(scripts);
        }
Example #51
0
        private static void bootstrap(BundleCollection bundles)
        {
            var bootstrap = new ScriptBundle("~/bundles/bootstrap", "//netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/js/bootstrap.min.js").Include("~/Scripts/bootstrap.min.js");

            bootstrap.CdnFallbackExpression = "$.fn.modal";
            bundles.Add(bootstrap);

            bundles.Add(new StyleBundle("~/Content/bootstrap", "//netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/css/bootstrap.min.css").Include("~/Content/bootstrap/css/bootstrap.css"));

            bundles.Add(new StyleBundle("~/Content/bootstrap_responsive").Include("~/Content/bootstrap/css/bootstrap-responsive.css"));
        }
Example #52
0
        public static void RegisterBundles(BundleCollection bundles)
        {
            StyleBundle styles = new StyleBundle("~/Bundles/styles");

            styles.Include("~/Content/principal.css");
            bundles.Add(styles);

            ScriptBundle scripts = new ScriptBundle("~/Bundles/scripts");

            bundles.Add(scripts);
        }
Example #53
0
        private static void webApi(BundleCollection bundles)
        {
            var parsley = new ScriptBundle("~/bundles/parsley", "//cdnjs.cloudflare.com/ajax/libs/parsley.js/1.2.2/parsley.min.js")
                          .Include("~/Scripts/parsley.min.js");

            parsley.CdnFallbackExpression = "window.parsley";
            bundles.Add(parsley);

            bundles.Add(new ScriptBundle("~/bundles/app_api").Include(
                            "~/Scripts/app.Api.js"));
        }
Example #54
0
        public static void RegisterLanguageSpecificBundles(BundleCollection bundles, CultureInfo culture)
        {
            var bundleName = LocalizedScripts.GetLocalizedBundleName("~/js/default.bundle.js", ContextLanguageInfo.ResolveCultureLcid(culture.LCID));

            var defaultBundle = new ScriptBundle(bundleName);

            defaultBundle.Include("~/js/bootstrap.min.js",
                                  "~/js/eventListener.polyfill.js",
                                  "~/js/handlebars.js",
                                  "~/js/date.js",
                                  "~/js/timeago/jquery.timeago.js",
                                  "~/js/google-code-prettify/prettify.js",
                                  "~/js/jquery.cookie.js",
                                  "~/js/jquery.bootstrap-pagination.js",
                                  "~/js/jquery.blockUI.js",
                                  "~/js/jquery.form.min.js",
                                  "~/js/entity-notes.js",
                                  "~/js/entity-form.js",
                                  "~/js/entity-grid.js",
                                  "~/js/entity-associate.js",
                                  "~/js/entity-lookup.js",
                                  "~/js/quickform.js",
                                  "~/js/serialized-query.js",
                                  "~/Areas/Cms/js/ads.js",
                                  "~/Areas/Cms/js/polls.js",
                                  "~/Areas/Chat/js/auth.js",
                                  "~/Areas/CaseManagement/js/case-deflection.js",
                                  "~/Areas/CaseManagement/js/entitlements.js",
                                  "~/Areas/Search/js/faceted-search.js",
                                  "~/Areas/KnowledgeManagement/js/article.js",
                                  "~/js/badges.js",
                                  "~/js/sharepoint-grid.js");

#if HIGHCHARTS
            defaultBundle.Include("~/js/charts/highcharts/highcharts.js");
#endif
#if HIGHCHARTSFUNNEL
            defaultBundle.Include("~/js/charts/highcharts/funnel.js");
#endif

            defaultBundle.Include("~/js/charts/crm/MicrosoftAjax.js",
                                  "~/js/charts/crm/Microsoft.Crm.Client.Core.js",
                                  "~/js/charts/crm/CrmInternalUtility.js",
                                  "~/js/charts/crm/CrmHighchartsLibrary.js",
                                  "~/js/charts/crm/PortalChartOrchestrator.js",
                                  "~/js/charts/chart.js",
                                  "~/js/jQuery.rateit.min.js",
                                  "~/js/rating.js",
                                  "~/js/portal.js")
            .Include(string.Format(CultureInfo.InvariantCulture, "~/js/timeago/locales/jquery.timeago.{0}.js",
                                   GetTimeAgoLanguageCode(culture)));

            bundles.Add(defaultBundle);
        }
        public static void RegisterScriptBundles(BundleCollection bundles)
        {
            Bundle bundle = new ScriptBundle(ScriptsGlobal);

            bundle.Orderer = new AsIsBundleOrderer();
            bundle.Include(
                "~/Scripts/require.js",
                "~/Scripts/require.config.js");

            bundles.Add(bundle);
        }
Example #56
0
        public void AssetIsNotMinified()
        {
            var asset  = new StubAsset("~/test.js", "define([],function(){var x = 1;})");
            var bundle = new ScriptBundle("~");

            var module = new AnonymousModule(asset, bundle);

            var output = asset.OpenStream().ReadToEnd();

            output.ShouldEqual("define(\"test\",[],function(){var x = 1;})");
        }
Example #57
0
        public static void RegisterBundles(BundleCollection bundles)
        {
            ScriptBundle scriptBndl = new ScriptBundle("~/Bundles/JS");

            scriptBndl.Include(
                "~/Scripts/jquery-{version}.js",
                "~/Scripts/jquery.validate*",
                "~/scripts/Script.js"
                );
            bundles.Add(scriptBndl);
        }
Example #58
0
        private static void AddAngularAppBundles(BundleCollection bundles, IEnumerable <string> appScriptsFiles)
        {
            var bundle = new ScriptBundle("~/bundles/jsangularApp");

            foreach (var appScriptsFile in appScriptsFiles
                     .Where(f => !f.ToLower().Contains("~/App/infrastructure/".ToLower())))
            {
                bundle.Include(appScriptsFile);
            }
            bundles.Add(bundle);
        }
Example #59
0
        // 有关绑定的详细信息,请访问 http://go.microsoft.com/fwlink/?LinkId=301862
        public static void RegisterBundles(BundleCollection bundles)
        {
            bundles.Add(new ScriptBundle("~/bundles/jquery").Include(
                            "~/Scripts/jquery-{version}.js"));

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

            bundles.Add(new ScriptBundle("~/bundles/jqueryvalex").Include(
                            "~/Scripts/myblog.validate.extension.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 https://modernizr.com to pick only the tests you need.
            bundles.Add(new ScriptBundle("~/bundles/modernizr").Include(
                            "~/Scripts/modernizr-*"));

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

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

            bundles.Add(new StyleBundle("~/bundles/cleanblog/bootstrapcss").Include(
                            "~/Content/clean_blog/vendor/bootstrap/css/bootstrap.min.css"));

            bundles.Add(new StyleBundle("~/bundles/cleanblog/fonts").Include(
                            "~/Content/clean_blog/vendor/font-awesome/css/font-awesome.min.css",
                            new CssRewriteUrlTransform()));

            var cleanBlogStyleBundle = new StyleBundle("~/bundles/cleanblog/css").Include(
                "~/Content/clean_blog/css/clean-blog.min.css",
                new SampleTransform());

            cleanBlogStyleBundle.Transforms.Add(new SampleBundleTransform());
            bundles.Add(cleanBlogStyleBundle);

            bundles.UseCdn = true;
            var jqueryCDNPath = "https://cdn.bootcss.com/jquery/3.3.1/jquery.min.js";
            var jqueryBundle  = new ScriptBundle("~/bundles/cleanblog/jquery", jqueryCDNPath).Include(
                "~/Content/clean_blog/vendor/jquery/jquery.js");

            jqueryBundle.CdnFallbackExpression = "window.jQuery";
            bundles.Add(jqueryBundle);

            bundles.Add(new ScriptBundle("~/bundles/cleanblog/bootstrapjs").Include(
                            "~/Content/clean_blog/vendor/bootstrap/js/*.js"));

            bundles.Add(new ScriptBundle("~/bundles/cleanblog/js").Include(
                            "~/Content/clean_blog/js/*.js"));

            BundleTable.EnableOptimizations = true;
        }
Example #60
0
        public static void RegisterBundle(BundleCollection bundles)
        {
            var bundle = new ScriptBundle("~/bundles/js");

            bundle.Include("~/Content/JS/JavaScript1.js",
                           "~/Content/JS/JavaScript2.js",
                           "~/Content/JS/JavaScript3.js");

            bundles.Add(bundle);
            BundleTable.EnableOptimizations = true;
        }