Пример #1
0
 public static void BundleJs(this Bundle bundle, string bundeledScriptUrl, bool minify = false)
 {
     BundleFiles(bundeledScriptUrl, bundle.FilePathList, minify);
     ReplaceTags(bundle.HtmlFilePath, bundle.FilePathList.Select(Path.GetFileName).ToList(), "text/javascript", bundeledScriptUrl, "<script type='text/javascript' src='{0}'></script>");
 }
Пример #2
0
 public static void BundleCss(this Bundle bundle, string bundeledScriptUrl)
 {
     BundleFiles(bundeledScriptUrl, bundle.FilePathList, false);
     ReplaceTags(bundle.HtmlFilePath, bundle.FilePathList.Select(Path.GetFileName).ToList(), "stylesheet", bundeledScriptUrl, "<link rel='stylesheet' href='{0}'>");
 }
Пример #3
0
 public static Bundle AddFile(this Bundle bundle, string path)
 {
     bundle.FilePathList.Add(path);
     return(bundle);
 }