예제 #1
0
 private static void addHtmlPathToPackage(JsPackage package)
 {
     var path = System.Web.VirtualPathUtility.ToAbsolute("~/Scripts/" + package.Name + "/" + package.Name + ".html");
     if (System.IO.File.Exists(System.Web.HttpContext.Current.Server.MapPath(path)))
     {
         package.HtmlPath = path;
     }
 }
예제 #2
0
        static JsPackageRepository()
        {
            var reglist = JsPackageRegistrationProvider.Packages.OrderBy(p => p.Name);
            foreach (var reg in reglist)
            {
                var package = new JsPackage
                              	{
                              		Name = reg.Name,
                              		Description = reg.Description
                              	};

                var config = new JsPackageConfig(package);
                reg.ConfigureJsPackage(config);
                addTestScriptsToPackage(package);
                addScriptPathToPackage(package);
                addHtmlPathToPackage(package);
                packages.Add(config.Package);
            }
        }
예제 #3
0
 private static void addTestScriptsToPackage(JsPackage package)
 {
     package.TestScripts = new List<string>();
     package.TestScripts.AddRange(getTestScriptsInFolder("~/Scripts/" + package.Name + "/"));
     package.TestScripts.AddRange(getTestScriptsInFolder("~/Scripts/" + package.Name + "/tests/"));
 }
예제 #4
0
 private static void addScriptPathToPackage(JsPackage package)
 {
     var path = System.Web.VirtualPathUtility.ToAbsolute("~/Scripts/" + package.Name + "/" + package.JsName);
     package.ScriptPath = path;
 }