The next generation of the Teknik Services. Written in ASP.NET. https://www.teknik.io/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

BundleConfig.cs 2.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. using System.Web;
  2. using System.Web.Optimization;
  3. using Teknik.Configuration;
  4. using Teknik.Utilities;
  5. namespace Teknik
  6. {
  7. public class BundleConfig
  8. {
  9. // For more information on bundling, visit http://go.microsoft.com/fwlink/?LinkId=301862
  10. public static void RegisterBundles(BundleCollection bundles)
  11. {
  12. // Load the config options
  13. Config config = Config.Load();
  14. // Set if we are using Cdn
  15. bundles.UseCdn = config.UseCdn;
  16. BundleTable.EnableOptimizations = false;
  17. #if !DEBUG
  18. BundleTable.EnableOptimizations = true;
  19. #endif
  20. bundles.Add(new CdnStyleBundle("~/Content/Common", config.CdnHost).Include(
  21. "~/Content/bootstrap.css",
  22. "~/Content/font-awesome.css",
  23. "~/Content/common.css"));
  24. bundles.Add(new CdnScriptBundle("~/bundles/common", config.CdnHost).Include(
  25. "~/Scripts/jquery-{version}.js",
  26. "~/Scripts/jquery.validate*",
  27. "~/Scripts/bootstrap.js",
  28. "~/Scripts/bootstrap-select.js",
  29. "~/Scripts/common.js",
  30. "~/Scripts/respond.js"));
  31. bundles.Add(new CdnScriptBundle("~/bundles/jquery", config.CdnHost).Include(
  32. "~/Scripts/jquery-{version}.js",
  33. "~/Scripts/jquery.validate*"));
  34. // Use the development version of Modernizr to develop with and learn from. Then, when you're
  35. // ready for production, use the build tool at http://modernizr.com to pick only the tests you need.
  36. bundles.Add(new CdnScriptBundle("~/bundles/modernizr", config.CdnHost).Include(
  37. "~/Scripts/modernizr-*"));
  38. bundles.Add(new CdnScriptBundle("~/bundles/markdown", config.CdnHost).Include(
  39. "~/Scripts/PageDown/Markdown.Converter.js",
  40. "~/Scripts/PageDown/Markdown.Sanitizer.js"));
  41. bundles.Add(new CdnScriptBundle("~/bundles/signalr", config.CdnHost).Include(
  42. "~/Scripts/jquery.signalR-{version}.js"));
  43. }
  44. }
  45. }