Code listings for the blog post /2017/01/12/bundling-in-net-…lerminifier-core/
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8" /> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | |
<environment names="Development"> | |
<link rel="stylesheet" href="~/css/site.css" /> | |
</environment> | |
<environment names="Staging,Production"> | |
<link rel="stylesheet" href="~/css/site.min.css" asp-append-version="true" /> | |
</environment> | |
</head> | |
<body> | |
<environment names="Development"> | |
<script src="~/js/site.js" asp-append-version="true"></script> | |
</environment> | |
<environment names="Staging,Production"> | |
<script src="~/js/site.min.js" asp-append-version="true"></script> | |
</environment> | |
</body> |
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
"dependencies": { | |
"Microsoft.NETCore.App": { | |
"version": "1.0.0", | |
"type": "platform" | |
}, | |
"Microsoft.AspNetCore.Authentication.Cookies": "1.0.0", | |
"Microsoft.AspNetCore.Diagnostics": "1.0.0", | |
"Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore": "1.0.0", | |
"Microsoft.AspNetCore.Identity.EntityFrameworkCore": "1.0.0", | |
"Microsoft.AspNetCore.Mvc": "1.0.0", | |
"BundlerMinifier.Core": "2.2.306" | |
}, | |
"scripts": { | |
"precompile": [ | |
"dotnet bundle" | |
], | |
"prepublish": [ | |
"bower install" | |
], | |
"postpublish": [ | |
"dotnet publish-iis --publish-folder %publish:OutputPath% --framework %publish:FullTargetFramework%" | |
] | |
} |
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
[ | |
{ | |
"outputFileName": "wwwroot/css/site.min.css", | |
"inputFiles": [ | |
"wwwroot/css/site.css" | |
] | |
}, | |
{ | |
"outputFileName": "wwwroot/js/site.min.js", | |
"inputFiles": [ | |
"wwwroot/js/site.js" | |
], | |
"minify": { | |
"enabled": true, | |
"renameLocals": true | |
}, | |
"sourceMap": false | |
} | |
] |
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
"tools": { | |
"BundlerMinifier.Core": "2.2.306", | |
"Microsoft.AspNetCore.Razor.Tools": "1.1.0-preview4-final", | |
"Microsoft.AspNetCore.Server.IISIntegration.Tools": "1.1.0-preview4-final", | |
"Microsoft.EntityFrameworkCore.Tools.DotNet": "1.1.0-preview4-final", | |
"Microsoft.Extensions.SecretManager.Tools": "1.1.0-preview4-final", | |
"Microsoft.VisualStudio.Web.CodeGeneration.Tools": { | |
"version": "1.1.0-preview4-final", | |
"imports": [ | |
"portable-net45+win8" | |
] | |
} | |
}, | |
"scripts": { | |
"precompile": [ "dotnet bundle" ], | |
"prepublish": [ "bower install" ], | |
"postpublish": [ "dotnet publish-iis --publish-folder %publish:OutputPath% --framework %publish:FullTargetFramework%" ] | |
}, |
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
dotnet restore | |
yo aspnet | |
cd Mvc-with-bundlerminifier-core | |
dotnet restore | |
dotnet bundle | |
Bundling with configuration from /path/to/source/bundleconfig.json | |
Processing wwwroot/css/site.min.css | |
Minified | |
Processing wwwroot/js/site.min.js | |
Project Mvc-with-bundlerminifier-core (.NETCoreApp,Version=v1.0) will be compiled because project is not safe for incremental compilation. Use --build-profile flag for more information. | |
Compiling Mvc-with-bundlerminifier-core for .NETCoreApp,Version=v1.0 | |
Bundling with configuration from /path/to/source/bundleconfig.json | |
Processing wwwroot/css/site.min.css | |
Minified | |
Processing wwwroot/js/site.min.js | |
Minified | |
Compilation succeeded. | |
0 Warning(s) | |
0 Error(s) | |
Time elapsed 00:00:04.8390327 | |
dotnet bundle clean | |
Bundling with configuration from /path/to/source/bundleconfig.json | |
Deleted /path/to/source/ | |
Deleted /path/to/source/ | |
dotnet bundle | |
dotnet bundle watch | |
Bundling with configuration from /path/to/source/bundleconfig.json | |
Watching... Press [Enter] to stop | |
Processing wwwroot/css/site.min.css | |
Processing wwwroot/css/site.min.css | |
Minified | |
Watching... Press [Enter] to stop | |
Bundling with configuration from /path/to/source/bundleconfig.json | |
Watching... Press [Enter] to stop | |
An error occurred while processing | |
Watching... Press [Enter] to stop |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment