Skip to content

Commit

Permalink
Fix minification failures and delete unused assets (NuGet#7963)
Browse files Browse the repository at this point in the history
  • Loading branch information
joelverhagen committed Apr 25, 2020
1 parent e927718 commit 7322a06
Show file tree
Hide file tree
Showing 98 changed files with 279 additions and 6,536 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ tools/
.nuget/.marker.v*
nuget.exe
AssemblyInfo.g.cs
*.g.txt
tests/Scripts/Config-*.json

# MSTest test Results
Expand Down
1 change: 1 addition & 0 deletions sign.thirdparty.props
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<ThirdPartyBinaries Include="AnglicanGeek.MarkdownMailer.dll" />
<ThirdPartyBinaries Include="Antlr3.Runtime.dll" />
<ThirdPartyBinaries Include="Autofac.dll" />
<ThirdPartyBinaries Include="Autofac.Extensions.DependencyInjection.dll" />
<ThirdPartyBinaries Include="Autofac.Integration.Mvc.dll" />
Expand Down
21 changes: 13 additions & 8 deletions src/NuGetGallery/App_Start/AppActivator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ private static RazorViewEngine CreateViewEngine()
private static void BundlingPostStart()
{
// Add primary style bundle
Bundle stylesBundle = new StyleBundle("~/Content/css");
Bundle stylesBundle = new StyleBundle("~/Content/css.min.css");
foreach (string filename in new[] {
"Site.css",
"Layout.css",
Expand Down Expand Up @@ -145,6 +145,14 @@ private static void BundlingPostStart()
.Include("~/Scripts/gallery/common-multi-select-dropdown.js");
BundleTable.Bundles.Add(multiSelectDropdownBundle);

var asyncFileUploadScriptBundle = new ScriptBundle("~/Scripts/gallery/async-file-upload.min.js")
.Include("~/Scripts/gallery/async-file-upload.js");
BundleTable.Bundles.Add(asyncFileUploadScriptBundle);

var certificatesScriptBundle = new ScriptBundle("~/Scripts/gallery/certificates.min.js")
.Include("~/Scripts/gallery/certificates.js");
BundleTable.Bundles.Add(certificatesScriptBundle);

var homeScriptBundle = new ScriptBundle("~/Scripts/gallery/page-home.min.js")
.Include("~/Scripts/gallery/page-home.js");
BundleTable.Bundles.Add(homeScriptBundle);
Expand Down Expand Up @@ -204,16 +212,13 @@ private static void BundlingPostStart()
new ScriptResourceDefinition { Path = scriptBundle.Path });

// Add support requests bundles
var jQueryUiStylesBundle = new StyleBundle("~/Content/themes/custom/jqueryui")
.Include("~/Content/themes/custom/jquery-ui-1.10.3.custom.css");
BundleTable.Bundles.Add(jQueryUiStylesBundle);

var supportRequestStylesBundle = new StyleBundle("~/Content/page-support-requests")
var supportRequestStylesBundle = new StyleBundle("~/Content/themes/custom/page-support-requests.min.css")
.Include("~/Content/themes/custom/jquery-ui-1.10.3.custom.css")
.Include("~/Content/admin/SupportRequestStyles.css");
BundleTable.Bundles.Add(supportRequestStylesBundle);

var supportRequestsBundle = new ScriptBundle("~/Scripts/page-support-requests")
.Include("~/Scripts/gallery/jquery-ui-{version}.js")
var supportRequestsBundle = new ScriptBundle("~/Scripts/page-support-requests.min.js")
.Include("~/Scripts/gallery/jquery-ui-1.10.3.js")
.Include("~/Scripts/gallery/knockout-projections.js")
.Include("~/Scripts/gallery/page-support-requests.js");
BundleTable.Bundles.Add(supportRequestsBundle);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@
}

@section TopScripts{
@Styles.Render("~/Content/themes/custom/jqueryui")
@Styles.Render("~/Content/page-support-requests")
@Styles.Render("~/Content/themes/custom/page-support-requests.min.css")
}

@ViewHelpers.AjaxAntiForgeryToken(Html)
Expand Down Expand Up @@ -87,7 +86,7 @@
</section>

@section BottomScripts{
@Scripts.Render("~/Scripts/page-support-requests")
@Scripts.Render("~/Scripts/page-support-requests.min.js")

<script type="text/javascript">
$(function () {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@
}

@section TopStyles{
@Styles.Render("~/Content/themes/custom/jqueryui")
@Styles.Render("~/Content/page-support-requests")
@Styles.Render("~/Content/themes/custom/page-support-requests.min.css")
}

@ViewHelpers.AjaxAntiForgeryToken(Html)
Expand Down Expand Up @@ -177,7 +176,7 @@
@section BottomScripts {
@if (Model != null)
{
@Scripts.Render("~/Scripts/page-support-requests")
@Scripts.Render("~/Scripts/page-support-requests.min.js")

<script type="text/javascript">
$(function () {
Expand Down
225 changes: 0 additions & 225 deletions src/NuGetGallery/Content/SyntaxHighlighter/shCore.css

This file was deleted.

Loading

0 comments on commit 7322a06

Please sign in to comment.