예제 #1
0
        public static void RegisterBundles(BundleCollection bundles)
        {
            var lessBundle = new LessBundle("~/bundles/semantic-ui").Include(
                "~/less/basic.icon.less",
                "~/less/button.less",
                "~/less/divider.less",
                "~/less/form.less",
                "~/less/grid.less",
                "~/less/header.less",
                "~/less/icon.less",
                "~/less/input.less",
                "~/less/item.less",
                "~/less/list.less",
                "~/less/menu.less",
                "~/less/message.less",
                "~/less/segment.less",
                "~/less/table.less",
                "~/less/dropdown.less"
                );

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

            bundles.Add(lessBundle);
            BundleTable.EnableOptimizations = true;
        }
예제 #2
0
파일: Bundles.cs 프로젝트: atiqShafi/sample
        public static List<Bundle> Build()
        {
            var result = new List<Bundle>();

            var css = new StyleBundle("~/styles")
                .IncludeDirectory("~/Public/Vendor", "*.css", true)
                .IncludeDirectory("~/Public/Css", "*.css")
                .IncludeDirectory("~/Public/App/core", "*.css", true);
            css.Transforms.Add(new CssUrlTransform());

            var js = new ScriptBundle("~/scripts")
                .Include("~/Public/Vendor/jquery-2.1.1.js", "~/Public/Vendor/moment-with-locales.js", "~/Public/Vendor/angular/angular.js")
                .IncludeDirectory("~/Public/Vendor/", "*.js", true);

            var less = new LessBundle("~/less")
                .IncludeDirectory("~/Public/", "*.less", true);

            var angular = new ScriptBundle("~/app")
                .Include("~/Public/App/app.js")
                .IncludeDirectory("~/Public/App", "*.js", true);

            js.Transforms.Clear();
            js.Transforms.Add(new AngularJsTransform());
            angular.Transforms.Clear();
            angular.Transforms.Add(new AngularJsTransform());

            var html = new TemplateBundle("~/templates", new TemplateCompilerOptions { ModuleName = "app", Standalone = false })
                .IncludeDirectory("~/Public/App/", "*.html", true);

            result.Add(css);
            result.Add(js);
            result.Add(angular);
            result.Add(html);
            result.Add(less);
            return result;
        }
예제 #3
0
 private static void RegisterLessBundles(BundleCollection bundles)
 {
     var lessBundle = new LessBundle("~/less/site")
                         .Include("~/content/bootstrap/less/bootstrap.less");
     bundles.Add(lessBundle);
 }