forked from dotnet/AspNetDocs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
26 changed files
with
679 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file added
BIN
+83.4 KB
.../client-side/bundling-and-minification/_static/bundler-extension-suggestion.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+39.8 KB
aspnetcore/client-side/bundling-and-minification/_static/convert-togulp.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+39.8 KB
aspnetcore/client-side/bundling-and-minification/_static/enable-onbuild.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+16.4 KB
aspnetcore/client-side/bundling-and-minification/_static/view-extension.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions
3
...etcore/client-side/bundling-and-minification/samples/BuildBundlerMinifierExample/.bowerrc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"directory": "wwwroot/lib" | ||
} |
23 changes: 23 additions & 0 deletions
23
...g-and-minification/samples/BuildBundlerMinifierExample/BuildBundlerMinifierExample.csproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<Project Sdk="Microsoft.NET.Sdk.Web"> | ||
|
||
<PropertyGroup> | ||
<TargetFramework>netcoreapp1.1</TargetFramework> | ||
</PropertyGroup> | ||
|
||
<PropertyGroup> | ||
<PackageTargetFallback>$(PackageTargetFallback);portable-net45+win8+wp8+wpa81;</PackageTargetFallback> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<PackageReference Include="BuildBundlerMinifier" Version="2.4.337" /> | ||
<PackageReference Include="Microsoft.ApplicationInsights.AspNetCore" Version="2.0.0" /> | ||
<PackageReference Include="Microsoft.AspNetCore" Version="1.1.1" /> | ||
<PackageReference Include="Microsoft.AspNetCore.Mvc" Version="1.1.2" /> | ||
<PackageReference Include="Microsoft.AspNetCore.StaticFiles" Version="1.1.1" /> | ||
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="1.1.1" /> | ||
<PackageReference Include="Microsoft.VisualStudio.Web.BrowserLink" Version="1.1.0" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<DotNetCliToolReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Tools" Version="1.0.0" /> | ||
</ItemGroup> | ||
|
||
</Project> |
35 changes: 35 additions & 0 deletions
35
...ndling-and-minification/samples/BuildBundlerMinifierExample/Controllers/HomeController.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Threading.Tasks; | ||
using Microsoft.AspNetCore.Mvc; | ||
|
||
namespace BuildBundlerMinifierExample.Controllers | ||
{ | ||
public class HomeController : Controller | ||
{ | ||
public IActionResult Index() | ||
{ | ||
return View(); | ||
} | ||
|
||
public IActionResult About() | ||
{ | ||
ViewData["Message"] = "Your application description page."; | ||
|
||
return View(); | ||
} | ||
|
||
public IActionResult Contact() | ||
{ | ||
ViewData["Message"] = "Your contact page."; | ||
|
||
return View(); | ||
} | ||
|
||
public IActionResult Error() | ||
{ | ||
return View(); | ||
} | ||
} | ||
} |
25 changes: 25 additions & 0 deletions
25
...core/client-side/bundling-and-minification/samples/BuildBundlerMinifierExample/Program.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.IO; | ||
using System.Linq; | ||
using System.Threading.Tasks; | ||
using Microsoft.AspNetCore.Hosting; | ||
|
||
namespace BuildBundlerMinifierExample | ||
{ | ||
public class Program | ||
{ | ||
public static void Main(string[] args) | ||
{ | ||
var host = new WebHostBuilder() | ||
.UseKestrel() | ||
.UseContentRoot(Directory.GetCurrentDirectory()) | ||
.UseIISIntegration() | ||
.UseStartup<Startup>() | ||
.UseApplicationInsights() | ||
.Build(); | ||
|
||
host.Run(); | ||
} | ||
} | ||
} |
60 changes: 60 additions & 0 deletions
60
...core/client-side/bundling-and-minification/samples/BuildBundlerMinifierExample/Startup.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Threading.Tasks; | ||
using Microsoft.AspNetCore.Builder; | ||
using Microsoft.AspNetCore.Hosting; | ||
using Microsoft.Extensions.Configuration; | ||
using Microsoft.Extensions.DependencyInjection; | ||
using Microsoft.Extensions.Logging; | ||
|
||
namespace BuildBundlerMinifierExample | ||
{ | ||
public class Startup | ||
{ | ||
public Startup(IHostingEnvironment env) | ||
{ | ||
var builder = new ConfigurationBuilder() | ||
.SetBasePath(env.ContentRootPath) | ||
.AddJsonFile("appsettings.json", optional: false, reloadOnChange: true) | ||
.AddJsonFile($"appsettings.{env.EnvironmentName}.json", optional: true) | ||
.AddEnvironmentVariables(); | ||
Configuration = builder.Build(); | ||
} | ||
|
||
public IConfigurationRoot Configuration { get; } | ||
|
||
// This method gets called by the runtime. Use this method to add services to the container. | ||
public void ConfigureServices(IServiceCollection services) | ||
{ | ||
// Add framework services. | ||
services.AddMvc(); | ||
} | ||
|
||
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline. | ||
public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory) | ||
{ | ||
loggerFactory.AddConsole(Configuration.GetSection("Logging")); | ||
loggerFactory.AddDebug(); | ||
|
||
if (env.IsDevelopment()) | ||
{ | ||
app.UseDeveloperExceptionPage(); | ||
app.UseBrowserLink(); | ||
} | ||
else | ||
{ | ||
app.UseExceptionHandler("/Home/Error"); | ||
} | ||
|
||
app.UseStaticFiles(); | ||
|
||
app.UseMvc(routes => | ||
{ | ||
routes.MapRoute( | ||
name: "default", | ||
template: "{controller=Home}/{action=Index}/{id?}"); | ||
}); | ||
} | ||
} | ||
} |
Oops, something went wrong.