aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.WebDashboard/Api/DashboardService.cs
diff options
context:
space:
mode:
Diffstat (limited to 'MediaBrowser.WebDashboard/Api/DashboardService.cs')
-rw-r--r--MediaBrowser.WebDashboard/Api/DashboardService.cs32
1 files changed, 25 insertions, 7 deletions
diff --git a/MediaBrowser.WebDashboard/Api/DashboardService.cs b/MediaBrowser.WebDashboard/Api/DashboardService.cs
index 030dc7f33..c6155b1b3 100644
--- a/MediaBrowser.WebDashboard/Api/DashboardService.cs
+++ b/MediaBrowser.WebDashboard/Api/DashboardService.cs
@@ -317,7 +317,6 @@ namespace MediaBrowser.WebDashboard.Api
_fileSystem.DeleteFile(Path.Combine(path, "thirdparty", "jquerymobile-1.4.5", "jquery.mobile-1.4.5.min.map"));
_fileSystem.DeleteDirectory(Path.Combine(path, "bower_components"), true);
- _fileSystem.DeleteDirectory(Path.Combine(path, "thirdparty", "viblast"), true);
// But we do need this
CopyFile(Path.Combine(creator.DashboardUIPath, "bower_components", "webcomponentsjs", "webcomponents-lite.js"), Path.Combine(path, "bower_components", "webcomponentsjs", "webcomponents-lite.js"));
@@ -336,17 +335,18 @@ namespace MediaBrowser.WebDashboard.Api
CopyFile(Path.Combine(creator.DashboardUIPath, "bower_components", "hammerjs", "hammer.min.js"), Path.Combine(path, "bower_components", "hammerjs", "hammer.min.js"));
CopyFile(Path.Combine(creator.DashboardUIPath, "bower_components", "Sortable", "Sortable.min.js"), Path.Combine(path, "bower_components", "Sortable", "Sortable.min.js"));
+ CopyFile(Path.Combine(creator.DashboardUIPath, "bower_components", "fetch", "fetch.js"), Path.Combine(path, "bower_components", "fetch", "fetch.js"));
+ CopyFile(Path.Combine(creator.DashboardUIPath, "bower_components", "native-promise-only", "lib", "npo.src.js"), Path.Combine(path, "bower_components", "native-promise-only", "lib", "npo.src.js"));
+ CopyFile(Path.Combine(creator.DashboardUIPath, "bower_components", "headroom.js", "dist", "headroom.min.js"), Path.Combine(path, "bower_components", "headroom.js", "dist", "headroom.min.js"));
+ CopyFile(Path.Combine(creator.DashboardUIPath, "bower_components", "isMobile", "isMobile.min.js"), Path.Combine(path, "bower_components", "isMobile", "isMobile.min.js"));
}
-
- MinifyCssDirectory(Path.Combine(path, "css"));
- MinifyJsDirectory(Path.Combine(path, "scripts"));
- MinifyJsDirectory(Path.Combine(path, "apiclient"));
- MinifyJsDirectory(Path.Combine(path, "voice"));
+
+ MinifyCssDirectory(path);
+ MinifyJsDirectory(path);
await DumpHtml(creator.DashboardUIPath, path, mode, culture, appVersion);
await DumpJs(creator.DashboardUIPath, path, mode, culture, appVersion);
- await DumpFile("scripts/all.js", Path.Combine(path, "scripts", "all.js"), mode, culture, appVersion).ConfigureAwait(false);
await DumpFile("css/all.css", Path.Combine(path, "css", "all.css"), mode, culture, appVersion).ConfigureAwait(false);
return "";
@@ -356,6 +356,15 @@ namespace MediaBrowser.WebDashboard.Api
{
foreach (var file in Directory.GetFiles(path, "*.css", SearchOption.AllDirectories))
{
+ if (file.IndexOf(".min.", StringComparison.OrdinalIgnoreCase) != -1)
+ {
+ continue;
+ }
+ if (file.IndexOf("bower_", StringComparison.OrdinalIgnoreCase) != -1)
+ {
+ continue;
+ }
+
try
{
var text = _fileSystem.ReadAllText(file, Encoding.UTF8);
@@ -383,6 +392,15 @@ namespace MediaBrowser.WebDashboard.Api
{
foreach (var file in Directory.GetFiles(path, "*.js", SearchOption.AllDirectories))
{
+ if (file.IndexOf(".min.", StringComparison.OrdinalIgnoreCase) != -1)
+ {
+ continue;
+ }
+ if (file.IndexOf("bower_", StringComparison.OrdinalIgnoreCase) != -1)
+ {
+ continue;
+ }
+
try
{
var text = _fileSystem.ReadAllText(file, Encoding.UTF8);