public static void RegisterBundles(BundleCollection bundles)
        {
            var cssTransformer = new CssTransformer();
            var jsTransformer = new JsTransformer();
            var nullOrderer = new NullOrderer();

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

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

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

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

            bundles.Add(lessBundle);

              //      BundleTable.EnableOptimizations = true;
        }
Example #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);
        }
        public static void RegisterBundles(BundleCollection bundles)
        {
            bundles.UseCdn = true;

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

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

            bundles.Add(commonStylesBundle);

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

            bundles.Add(appStylesBundle);
        }
Example #4
0
        public static void RegisterBundles(BundleCollection bundles)
        {
            var cssTransformer = new CssTransformer();
             var jsTransformer = new JsTransformer();

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

             bundles.Add(commonStylesBundle);

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

             bundles.Add(modernizrBundle);

             var commonScriptsBundle = new Bundle("~/jquery");
             commonScriptsBundle.Include(
            "~/Scripts/jquery-{version}.js",
            "~/Scripts/jquery-migrate-{version}.js"
            );
             commonScriptsBundle.Transforms.Add(jsTransformer);
             bundles.Add(commonScriptsBundle);

            var jqueryDependentScriptsBundle = new Bundle("~/js");
            jqueryDependentScriptsBundle.Include(
                "~/Scripts/bootstrap.js",
                "~/Scripts/jquery.validate.js",
                "~/Scripts/jquery.validate.unobtrusive.js"
                , "~/Scripts/jquery.unobtrusive-ajax.js");
            jqueryDependentScriptsBundle.Transforms.Add(jsTransformer);
            bundles.Add(jqueryDependentScriptsBundle);
        }
Example #5
0
        public static void RegisterBundles(BundleCollection bundles)
        {
            var cssTransformer = new CssTransformer();
            var jsTransformer = new JsTransformer();
            var nullOrderer = new NullOrderer();

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

            bundles.Add(commonStylesBundle);

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

            bundles.Add(commonScriptsBundle);
        }
Example #6
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 #7
0
        public static void RegisterBundles(BundleCollection bundles)
        {
            var cssTransformer = new CssTransformer();
            var jsTransformer = new JsTransformer();
            var nullOrderer = new NullOrderer();

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

            bundles.Add(commonStylesBundle);

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

            //bundles.Add(modernizrBundle);

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

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

            bundles.Add(commonScriptsBundle);

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

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

            bundles.Add(testScriptsBundle);
        }
        public void Run()
        {
            var bundles = BundleTable.Bundles;

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

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

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

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

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

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

            bundles.Add(bootstrapBundle);

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

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

            bundles.Add(styleBundle);

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

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

            bundles.Add(css);

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

            //bundles.Add(jquery);
        }
Example #10
0
        private static void RegisterScripts(BundleCollection bundles)
        {
            var transform = new JsTransformer();

            var vendorjs = new ScriptBundle("~/js/libs") { Orderer = DefaultBundleOrderer };
            vendorjs.Transforms.Add(transform);
            vendorjs.Include("~/assets/js/vendor/json2.js");

            vendorjs.Include(
                "~/assets/js/vendor/jquery.js",
                "~/assets/js/vendor/jquery.ui.core.js",
                "~/assets/js/vendor/jquery.ui.widget.js",
                "~/assets/js/vendor/jquery.ui.mouse.js",
                "~/assets/js/vendor/jquery.ui.resizable.js",
                "~/assets/js/vendor/jquery.signalr.js");

            vendorjs.Include(
                "~/assets/js/vendor/dot.js",
                "~/assets/js/vendor/underscore.js");

            vendorjs.Include(
                "~/assets/js/vendor/bootstrap.js",
                "~/assets/js/vendor/codemirror.js",
                "~/assets/js/vendor/codemirror.clike.js",
                "~/assets/js/vendor/shortcut.js");

            vendorjs.ConcatenationToken = ";";
            bundles.Add(vendorjs);

            var js = new ScriptBundle("~/js/app") { Orderer = DefaultBundleOrderer };
            js.Transforms.Add(transform);
            js.Include("~/assets/js/compilify.js");
            js.Include("~/assets/js/resizer.js");
            js.Include("~/assets/js/tabs.js");
            bundles.Add(js);
        }
Example #11
0
        public static void RegisterBundles(BundleCollection bundles)
        {
            var cssTransformer = new CssTransformer(new YuiCssMinifier());
            var jsTransformer = new JsTransformer(new UglifyJsMinifier());
            var nullOrderer = new NullOrderer();

            // Lib CSS
            Bundle libCss = new Bundle("~/bundles/css_lib").IncludeDirectory("~/Content/css/lib/aui", "*.css");
            //libCss.Transforms.Add(cssTransformer);
            bundles.Add(libCss);

            // App CSS
            Bundle appCss = new Bundle("~/bundles/css_app").Include("~/Content/css/app/bootstrap.less", new CssRewriteUrlTransform());
            appCss.Transforms.Add(cssTransformer);
            bundles.Add(appCss);

//            // App CSS
//            Bundle appCss = new Bundle("~/bundles/css_app").Include("~/Content/less/app/bootstrap.less", new CssRewriteUrlTransform());
//            appCss.Transforms.Add(cssTransformer);
//            bundles.Add(appCss);

            // Lib JS
            Bundle libJs = new Bundle("~/bundles/js_lib").Include(
                "~/Scripts/jquery-{version}.js",
                "~/Content/js/lib/aui/aui-all.js");
            libJs.Transforms.Add(jsTransformer);
            libJs.Orderer = nullOrderer;
            bundles.Add(libJs);


#if (DEBUG && !DEBUGMINIFIED)
            BundleTable.EnableOptimizations = false;
#else
            BundleTable.EnableOptimizations = true;
#endif
        }
        public static void RegisterBundles(BundleCollection bundles)
        {
            try
            {
                var ignoreCompilationDebug = Settings.GetSetting("ignoreCompilationDebug") == "True" || string.IsNullOrEmpty(Settings.GetSetting("ignoreCompilationDebug"));

                if (ignoreCompilationDebug)
                {
                    BundleTable.EnableOptimizations = true;
                }

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

                var doc = XDocument.Load(HttpContext.Current.Server.MapPath(Config.BundlesConfigPath));

                foreach (string bundleType in "script,style".Split(','))
                {

                    foreach (var bundleElement in doc.Descendants(bundleType + "Bundle"))
                    {
                        var bundle = new Bundle(bundleElement.Attribute("virtualPath").Value);
                        var bundleHasFiles = false;
                        var dontMinify = bundleElement.Attribute("disableMinification") != null ? bundleElement.Attribute("disableMinification").Value == true.ToString() : false;

                        foreach (var includeElement in bundleElement.Elements())
                        {
                            var filePath = includeElement.Attribute("virtualPath").Value;
                            string fullPath = null;
                            try
                            {
                                fullPath = HttpContext.Current.Server.MapPath(filePath);
                            }
                            catch (Exception ex)
                            {
                                LogHelper.Warn<Exception>("Optmius skipped '" + filePath + "' in Bundle '" + bundle.Path + "' as the file path was invalid. Only application relative URLs (~/url) are allowed.");
                            }

                            if (fullPath != null)
                            {
                                bundle.Include(filePath);
                                bundleHasFiles = true;
                            }
                        }

                        if (bundleHasFiles)
                        {
                            if (bundleType == "script")
                            {
                                bundle.Transforms.Add(jsTransformer);
                                if(!dontMinify)
                                    bundle.Transforms.Add(new JsMinify());
                            }
                            else
                            {
                                bundle.Transforms.Add(cssTransformer);
                                if(!dontMinify)
                                    bundle.Transforms.Add(new CssMinify());
                            }
                            bundle.Orderer = nullOrderer;

                            bundles.Add(bundle);
                        }
                    }

                }

            }
            catch (Exception e)
            {
                LogHelper.Error(typeof(BundleCollection), "Error adding bundles: " + e.ToString(),e);
            }
        }
        public static void RegisterBundles(BundleCollection bundles)
        {
            var cssTransformer = new CssTransformer();
              var jsTransformer = new JsTransformer();
              var nullOrderer = new NullOrderer();

              // jQuery
              var jqueryUiCss = new Bundle("~/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(cssTransformer);
              jqueryUiCss.Transforms.Add(new CssMinify());
              jqueryUiCss.Orderer = nullOrderer;
              bundles.Add(jqueryUiCss);

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

              var js = new Bundle("~/bundles/js").Include(
            "~/Scripts/bootstrap.min.js",
            "~/Scripts/Prettify/prettify.js",
            "~/Scripts/application.js");
              js.Transforms.Add(jsTransformer);
              js.Orderer = nullOrderer;
              bundles.Add(js);

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

              // Css
              var css = new Bundle("~/bundles/css").Include(
            "~/Content/less/bootstrap.less",
            "~/Content/less/responsive.less",
            "~/Content/Prettify/prettify.css",
            "~/Content/docs.css",
            "~/Content/icons.css");
              css.Transforms.Add(cssTransformer);
              css.Transforms.Add(new CssMinify());
              css.Orderer = nullOrderer;
              bundles.Add(css);

              BundleTable.EnableOptimizations = true;
        }
        public static void registerBundles(BundleCollection bundles)
        {
            var nullBuilder = new NullBuilder();
            var cssTransformer = new CssTransformer();
            IBundleTransform jsTransformer = new JsTransformer(new BundleTransformer.Yui.Minifiers.YuiJsMinifier());
            var nullOrderer = new NullOrderer();

            //Styles
            var cssBase = new Bundle("~/Design/Styles/base", new CssMinify())
            .Include("~/Design/Styles/style_6in1.css", new CssRewriteUrlTransform())
                .Include("~/Design/Styles/style.css", new CssRewriteUrlTransform());

            var cssPlugin = new Bundle("~/Design/Styles/plugins", new CssMinify())
                .Include("~/Design/Styles/yl-modal.css", new CssRewriteUrlTransform())
                .Include("~/Design/Styles/jquery-toggle-buttons.css", new CssRewriteUrlTransform())
                .Include("~/Design/Styles/jquery-hint.css", new CssRewriteUrlTransform())
                .Include("~/Design/Styles/bootstrap-tagsinput.css", new CssRewriteUrlTransform());

            var cssBootstrap = new Bundle("~/Design/Styles/Bootstrap/bootstrap", new CssMinify())
                .Include("~/Design/Styles/Bootstrap/bootstrap.css")
                .Include("~/Design/Styles/Bootstrap/bootstrap-responsive.css", new CssRewriteUrlTransform())
                .Include("~/Design/Styles/Bootstrap/uniform.default.css", new CssRewriteUrlTransform())
                .Include("~/Design/Styles/Bootstrap/proggress.css", new CssRewriteUrlTransform());

            var cssCalendar = new Bundle("~/Design/Styles/Calendar/calendar", new CssMinify())
                .Include("~/Design/Styles/Calendar/fullcalendar.css", new CssRewriteUrlTransform());

            var cssDatatables = new Bundle("~/Design/Styles/Datatables/datatables", new CssMinify())
                .Include("~/Design/Styles/Datatables/DT_bootstrap.css", new CssRewriteUrlTransform())
                .Include("~/Design/Styles/Datatables/responsive-tables.css", new CssRewriteUrlTransform());

            var cssTEditor = new Bundle("~/Design/Styles/TEditor/editor", new CssMinify())
               .Include("~/Design/Styles/TEditor/style.css", new CssRewriteUrlTransform());

            var cssValidate = new Bundle("~/Design/Styles/Validate/validate", new CssMinify())
               .Include("~/Design/Styles/Validate/validationEngine.jquery.css", new CssRewriteUrlTransform());

            var cssDatePicker = new Bundle("~/Design/Styles/DatePicker/datepicker", new CssMinify())
                .Include("~/Design/Styles/DatePicker/daterangepicker.css", new CssRewriteUrlTransform())
                .Include("~/Design/Styles/DatePicker/datepicker.css", new CssRewriteUrlTransform());

            //Javascript
            var js = new Bundle("~/Scripts/base", jsTransformer)
                .Include("~/Scripts/main.js");

            //Script de Jquery
            var jsJQuery = new Bundle("~/Scripts/jquery", jsTransformer)
                .Include("~/Scripts/jquery-{version}.js");

            var jsJQueryUI = new Bundle("~/Scripts/jqueryui", jsTransformer)
                .Include("~/Scripts/jquery-ui.js");

            //Plugins
            var jsPlugins = new Bundle("~/Scripts/plugins", jsTransformer)
                .Include("~/Scripts/jquery-tmpl.js")
                .Include("~/Scripts/jquery-json-{version}.js")
                .Include("~/Scripts/jquery-hint.js")
                .Include("~/Scripts/jquery.uniform.js")
                .Include("~/Scripts/jquery.toggle.buttons.js")
                .Include("~/Scripts/yl-modal.js")
                .Include("~/Scripts/jquery-meiomask.js")
                .Include("~/Scripts/bootstrap-tagsinput.js")
                .Include("~/Scripts/jquery.cookie.js");

            //Bootstrap
            var jsBootstrap = new Bundle("~/Scripts/Bootstrap/bootstrap", jsTransformer)
                .Include("~/Scripts/Bootstrap/bootstrap.js")
                .Include("~/Scripts/Bootstrap/main.js");

            //Calendar
            var jsCalendar = new Bundle("~/Scripts/Calendar/calendar", jsTransformer)
                .Include("~/Scripts/Calendar/fullcalendar.js");

            //DataTables
            var jsDataTables = new Bundle("~/Scripts/Datatables/datatables", jsTransformer)
                .Include("~/Scripts/Datatables/jquery.tablesorter.min.js")
                .Include("~/Scripts/Datatables/jquery.dataTables.js")
                .Include("~/Scripts/Datatables/DT_bootstrap.js")
                .Include("~/Scripts/Datatables/responsive-tables.js");

            //Flot
            var jsFlot = new Bundle("~/Scripts/Flot/flot", jsTransformer)
            .Include("~/Scripts/Flot/jquery.flot.js")
            .Include("~/Scripts/Flot/jquery.colorhelpers.js")
            .Include("~/Scripts/Flot/jquery.easy-pie-chart.js")
            .Include("~/Scripts/Flot/jquery.flot.crosshair.js")
            .Include("~/Scripts/Flot/jquery.flot.fillbetween.js")
            .Include("~/Scripts/Flot/jquery.flot.image.js")
            .Include("~/Scripts/Flot/jquery.flot.navigate.js")
            .Include("~/Scripts/Flot/jquery.flot.pie.js")
            .Include("~/Scripts/Flot/jquery.flot.resize.js")
            .Include("~/Scripts/Flot/jquery.flot.selection.js")
            .Include("~/Scripts/Flot/jquery.flot.stack.js")
            .Include("~/Scripts/Flot/jquery.flot.symbol.js")
            .Include("~/Scripts/Flot/jquery.flot.threshold.js")
            .Include("~/Scripts/Flot/jquery.sparkline.min.js")
            .Include("~/Scripts/Flot/excanvas.js");

            //MarkitUp
            var jsMarkitup = new Bundle("~/Scripts/Markitup/editor", jsTransformer)
                .Include("~/Scripts/Markitup/*.js");

            var jsTEditor = new Bundle("~/Scripts/TEditor/editor", jsTransformer)
                .Include("~/Scripts/TEditor/jquery-te-1.4.0.js");

            var jsValidate = new Bundle("~/Scripts/Validate/validate", jsTransformer)
                .Include("~/Scripts/Validate/jquery.validate.js")
                .Include("~/Scripts/Validate/jquery.validationEngine.js")
                .Include("~/Scripts/Validate/jquery.validationEngine-pt_BR.js");

            var jsDatePicker = new Bundle("~/Scripts/DatePicker/datepicker", jsTransformer)
                .Include("~/Scripts/DatePicker/date.js")
                .Include("~/Scripts/DatePicker/jquery-daterangepicker.js")
                .Include("~/Scripts/DatePicker/jquery-datepicker.js");

            #if DEBUG
            //Remove o minify caso esteja em modo debug
            cssBase.Transforms.Clear();
            cssPlugin.Transforms.Clear();
            cssBootstrap.Transforms.Clear();
            cssCalendar.Transforms.Clear();
            cssDatatables.Transforms.Clear();
            cssTEditor.Transforms.Clear();
            cssValidate.Transforms.Clear();
            cssDatePicker.Transforms.Clear();

            js.Transforms.Clear();
            jsJQuery.Transforms.Clear();
            jsPlugins.Transforms.Clear();
            jsJQueryUI.Transforms.Clear();
            jsBootstrap.Transforms.Clear();
            jsCalendar.Transforms.Clear();
            jsDataTables.Transforms.Clear();
            jsFlot.Transforms.Clear();
            jsMarkitup.Transforms.Clear();
            jsTEditor.Transforms.Clear();
            jsValidate.Transforms.Clear();
            jsDatePicker.Transforms.Clear();

            #endif

            bundles.Add(cssBase);
            bundles.Add(cssPlugin);
            bundles.Add(cssBootstrap);
            bundles.Add(cssCalendar);
            bundles.Add(cssDatatables);
            bundles.Add(cssTEditor);
            bundles.Add(cssValidate);
            bundles.Add(cssDatePicker);

            bundles.Add(js);
            bundles.Add(jsJQuery);
            bundles.Add(jsPlugins);
            bundles.Add(jsJQueryUI);
            bundles.Add(jsBootstrap);
            bundles.Add(jsCalendar);
            bundles.Add(jsDataTables);
            bundles.Add(jsFlot);
            bundles.Add(jsMarkitup);
            bundles.Add(jsTEditor);
            bundles.Add(jsValidate);
            bundles.Add(jsDatePicker);
        }
Example #15
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);
        }
Example #16
0
        public static void RegisterBundles(BundleCollection bundles)
        {
            bundles.Add(new ScriptBundle("~/bundles/jquery").Include(
                        "~/Scripts/jquery-1.*"));

            bundles.Add(new ScriptBundle("~/bundles/jqueryui").Include(
                        "~/Scripts/jquery-ui*", "~/Scripts/jquery.ui*"));

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

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

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

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

            // MyJs
            bundles.Add(new Bundle("~/MyJs").Include(
                "~/Scripts/jquery.nailthumb.1.1.js",
                "~/Scripts/jquery.mousewheel.js",
                "~/Scripts/jquery.jscrollpane.js",
                "~/Scripts/jquery.ba-bbq.js",
                "~/Scripts/jquery.ba-resize.js"
                ));


            // MyCss
            bundles.Add(new Bundle("~/Content/MyCss").Include(
                "~/Content/jquery.nailthumb.1.1.css",
                "~/Content/jquery.jscrollpane1.css"
                ));


            var jsTransformer = new JsTransformer();
            var cssTransformer = new CssTransformer();
            var nullOrderer = new NullOrderer();
            var cssMinify = new CssMinify();
            var jsMinify = new JsMinify();

            // MyCoffee
            var bundle = new Bundle("~/MyCoffee").Include(
                "~/Scripts/EntryRenderer.coffee",
                "~/Scripts/HomePresenter.coffee",
                "~/Scripts/Application.coffee"
                );
            bundle.Transforms.Add(jsTransformer);
            if ("true".Equals(ConfigurationManager.AppSettings["CoffeeMinify"]))
                bundle.Transforms.Add(jsMinify);
            bundle.Orderer = nullOrderer;
            bundles.Add(bundle);

            // MySass
            bundle = new Bundle("~/Content/MySass").Include(
                "~/Content/enews.sass"
                );
            bundle.Transforms.Add(cssTransformer);
            if ("true".Equals(ConfigurationManager.AppSettings["SassMinify"]))
                bundle.Transforms.Add(cssMinify);
            bundle.Orderer = nullOrderer;
            bundles.Add(bundle);
        }
        // For more information on Bundling, visit http://go.microsoft.com/fwlink/?LinkId=254725
        /// <summary>
        /// Registers the bundles.
        /// </summary>
        /// <param name="bundles">The bundles.</param>
        public static void RegisterBundles(BundleCollection bundles)
        {
            var cssTransformer = new CssTransformer();
            var jsTransformer = new JsTransformer();
            var nullOrderer = new NullOrderer();

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

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

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

            bundles.Add(new ScriptBundle("~/bundles/ko").Include(
                        "~/Scripts/Libraries/knockout-2.2.1.js"));

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

            bundles.Add(new ScriptBundle("~/bundles/jquerymousewheel").Include(
                        "~/Scripts/Libraries/jquery.mousewheel.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/Libraries/modernizr-*"));

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

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

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

            var fullModulePath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "bin");
            foreach (var file in Directory.EnumerateFiles(fullModulePath, "EasyModules.NET.Modules.*Web.dll"))
            {
                var assembly = Assembly.LoadFile(file);
                var module = assembly.GetName().Name;
                bundles.Add(new ScriptBundle("~/bundles/" + module + "/js").Include("~/Modules/" + module + "/Scripts/Module/*.js"));
            }

            //TODO: need to finde better method so that modules may inject script and stylebundles
            //Script files for Ragnarok Game - Note that the order in which they are loaded is important
            bundles.Add(new ScriptBundle("~/bundles/ragnarok").Include(
                // melonJS framework
                        "~/Modules/EasyModules.NET.Modules.Games.Web/Ragnarok/Scripts/Extensions/melonJS-0.9.6.js"
                        , "~/Modules/EasyModules.NET.Modules.Games.Web/Ragnarok/Scripts/Extensions/astar.js"
                        , "~/Modules/EasyModules.NET.Modules.Games.Web/Ragnarok/Scripts/Extensions/graph.js"
                // Game initializer and main game logic
                        , "~/Modules/EasyModules.NET.Modules.Games.Web/Ragnarok/Scripts/Core/Main.js"
                // Resources
                        , "~/Modules/EasyModules.NET.Modules.Games.Web/Ragnarok/Scripts/Core/Resources.js"
                        , "~/Modules/EasyModules.NET.Modules.Games.Web/Ragnarok/Scripts/Core/Animations.js"
                        , "~/Modules/EasyModules.NET.Modules.Games.Web/Ragnarok/Scripts/Core/Dialogs.js"
                // Entities
                        , "~/Modules/EasyModules.NET.Modules.Games.Web/Ragnarok/Scripts/Entities/Player.js"
                        , "~/Modules/EasyModules.NET.Modules.Games.Web/Ragnarok/Scripts/Entities/HUD.js"
                        , "~/Modules/EasyModules.NET.Modules.Games.Web/Ragnarok/Scripts/Entities/Gold.js"
                        , "~/Modules/EasyModules.NET.Modules.Games.Web/Ragnarok/Scripts/Entities/NPCs.js"
                // Screens
                        , "~/Modules/EasyModules.NET.Modules.Games.Web/Ragnarok/Scripts/Core/Screens.js"
                        ));

            //allows you to force the optimizations to render as they would in release mode
            BundleTable.EnableOptimizations = true;
        }
Example #18
0
        public static void RegisterBundles(BundleCollection bundles)
        {
            // bundles.IgnoreList.Clear();
            //  AddDefaultIgnorePatterns(bundles.IgnoreList);
            //NOTE: it's bundles.DirectoryFilter in Microsoft.AspNet.Web.Optimization.1.1.3 and not bundles.IgnoreList

            var engine = new V8JsEngine();

            var uglySettings = new UglifySettings();

            uglySettings.Js.CodeGeneration.Beautify = true;

            bundles.UseCdn = false;

            var uglifyJsMinifier = new UglifyJsMinifier(() => engine, uglySettings)

            {
                CompressionOptions = { Angular = true },
                ParsingOptions = new ParsingOptions { Strict = true },
                CodeGenerationOptions = new CodeGenerationOptions()
            };

            var lessTranslator = new LessTranslator();

            var cssTransformer = new CssTransformer(new CleanCssMinifier(), new ITranslator[] { lessTranslator });

            var tsTranslater = new TypeScriptTranslator();

            var jsTransformer = new JsTransformer(uglifyJsMinifier, new List<ITranslator> { tsTranslater });

            var jsBundle = new CustomScriptBundle("~/bundles/js");

            jsBundle.IncludeDirectory("~/scripts", "*.js", true);
            jsBundle.IncludeDirectory("~/scripts", "*.map", true);

            bundles.IgnoreList.Ignore("angular-mocks.js");
            bundles.IgnoreList.Ignore("angular-scenario.js");

             //   jsBundle.IncludeDirectory("~/scripts/angular-dialog-service-5.1.2", "*.js", true);

            jsBundle.Builder = new DefaultBundleBuilder();

            jsBundle.Orderer = new JsBundlerOrderer();

            jsBundle.Transforms.Add(jsTransformer);

            bundles.Add(jsBundle);

            var typeScriptBundle = new CustomScriptBundle("~/bundles/ts");    //// Typescript generatred locally via visual studio and checked in - not done on the fly

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

            typeScriptBundle.Transforms.Add(jsTransformer);

            typeScriptBundle.Builder = new DefaultBundleBuilder();

            typeScriptBundle.Orderer = new JsBundlerOrderer();

            bundles.Add(typeScriptBundle);

            var lessCssBundle = new Bundle("~/bundles/less");

            lessCssBundle.Include("~/Content/bootstrap/bootstrap.less");

            lessCssBundle.Builder = new DefaultBundleBuilder();

            lessCssBundle.Transforms.Add(cssTransformer);

            lessCssBundle.Orderer = new DefaultBundleOrderer();

            bundles.Add(lessCssBundle);

            var cssBundle = new StyleBundle("~/bundles/css");

            cssBundle.IncludeDirectory("~/Content/Bootstrap", "*.css", false);
            cssBundle.IncludeDirectory("~/Content/", "*.css", false);
            cssBundle.IncludeDirectory("~/Content/css", "*.css", false);

            cssBundle.Builder = new DefaultBundleBuilder();

            cssBundle.Transforms.Add(cssTransformer);

            cssBundle.Orderer = new PushToTopOrderer("bootstrap");

            bundles.Add(cssBundle);

            var publicCssBundle = new StyleBundle("~/bundles/public/css");
            publicCssBundle.IncludeDirectory("~/Content/public", "*.css", true);
            publicCssBundle.Builder = new DefaultBundleBuilder();
            publicCssBundle.Transforms.Add(cssTransformer);
            publicCssBundle.Orderer = new PushToTopOrderer("bootstrap");
            bundles.Add(publicCssBundle);
        }