Skip to content

Commit

Permalink
Merge pull request #34 from nicotravassos/master
Browse files Browse the repository at this point in the history
Fix #33 & #32 - building site.min.js and site.min.css for release builds and Append version for included styles
  • Loading branch information
maraf committed Feb 4, 2019
2 parents fbef8f8 + 5015eb7 commit 5b0897a
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 3 deletions.
1 change: 1 addition & 0 deletions src/FileUpload.Web.UI/FileUpload.Web.UI.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="BuildBundlerMinifier" Version="2.7.385" />
<PackageReference Include="Microsoft.AspNetCore.App" />
<PackageReference Include="Neptuo" Version="6.0.1" />
</ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion src/FileUpload.Web.UI/Views/Shared/_Layout.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<link rel="stylesheet" href="~/css/site.css" />
</environment>
<environment exclude="Development">
<link rel="stylesheet" href="~/css/site.min.css" />
<link rel="stylesheet" href="~/css/site.min.css" asp-append-version="true" />
</environment>
</head>
<body>
Expand Down
24 changes: 24 additions & 0 deletions src/FileUpload.Web.UI/bundleconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
// Configure bundling and minification for the project.
// More info at https://go.microsoft.com/fwlink/?LinkId=808241
[
{
"outputFileName": "wwwroot/css/site.min.css",
// An array of relative input file paths. Globbing patterns supported
"inputFiles": [
"wwwroot/css/site.css"
]
},
{
"outputFileName": "wwwroot/js/site.min.js",
"inputFiles": [
"wwwroot/js/site.js"
],
// Optionally specify minification options
"minify": {
"enabled": true,
"renameLocals": true
},
// Optionally generate .map file
"sourceMap": false
}
]
2 changes: 1 addition & 1 deletion src/FileUpload.Web.UI/wwwroot/css/site.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/FileUpload.Web.UI/wwwroot/js/site.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 5b0897a

Please sign in to comment.