Skip to content
Merged
Show file tree
Hide file tree
Changes from 16 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -376,3 +376,6 @@ src/**/wwwroot/**/uploader
# Bootstrap
**/BootstrapBlazor/wwwroot/js/bootstrap.blazor.bundle.min.js
**/BootstrapBlazor/wwwroot/css/bootstrapblazor.min.css

# css
**/BootstrapBlazor/wwwroot/css/bootstrap.blazor.bundle.*.css
13 changes: 13 additions & 0 deletions dotnet-tools.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"version": 1,
"isRoot": true,
"tools": {
"bootstrapblazor.cssbundler": {
"version": "1.0.0",
"commands": [
"css-bundler"
],
"rollForward": false
}
}
}
20 changes: 9 additions & 11 deletions src/BootstrapBlazor/BootstrapBlazor.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Razor">

<PropertyGroup>
<Version>9.11.1-beta04</Version>
<Version>9.11.1-beta05</Version>
</PropertyGroup>

<ItemGroup>
Expand All @@ -10,18 +10,16 @@
</ItemGroup>

<ItemGroup>
<Content Remove="wwwroot\core\bootstrap\css\bootstrap.css" />
<Content Remove="wwwroot\core\bootstrap\css\bootstrap.rtl.css" />
<Content Remove="wwwroot\core\bootstrap\js\bootstrap.bundle.js" />
<Content Remove="wwwroot\core\bootstrap\js\bootstrap.bundle.min.js" />
<Content Remove="wwwroot\lib\swal\sweetalert2.css" />
<Content Remove="wwwroot\core\bootstrap\**\*.*" />
<Content Remove="wwwroot\lib\animate\*.css" />
<Content Remove="wwwroot\lib\swal\*.css" />
<Content Remove="wwwroot\scss\*" />
<None Include="wwwroot\core\bootstrap\css\bootstrap.css" />
<None Include="wwwroot\core\bootstrap\css\bootstrap.rtl.css" />
<None Include="wwwroot\core\bootstrap\js\bootstrap.bundle.js" />
<None Include="wwwroot\core\bootstrap\js\bootstrap.bundle.min.js" />
<None Include="wwwroot\lib\swal\sweetalert2.css" />
<Content Remove="wwwroot\css\bootstrapblazor.min.css" />
<None Include="wwwroot\core\bootstrap\**\*.*" />
<None Include="wwwroot\lib\animate\*.css" />
<None Include="wwwroot\lib\swal\*.css" />
<None Include="wwwroot\scss\*" />
<None Include="wwwroot\css\bootstrapblazor.min.css" />
</ItemGroup>

<ItemGroup>
Expand Down
16 changes: 12 additions & 4 deletions src/BootstrapBlazor/Directory.Build.targets
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,21 @@
</ItemGroup>

<PropertyGroup>
<BootstrapBundleFile>$(MSBuildThisFileDirectory)wwwroot/core/bootstrap/js/bootstrap.bundle.min.js</BootstrapBundleFile>
<TargetBootstrapBundleFile>$(MSBuildThisFileDirectory)wwwroot/js/bootstrap.blazor.bundle.min.js</TargetBootstrapBundleFile>
<BootstrapOriginJsFile>$(MSBuildThisFileDirectory)wwwroot/core/bootstrap/js/bootstrap.bundle.min.js</BootstrapOriginJsFile>
<BootstrapTargetJsFile>$(MSBuildThisFileDirectory)wwwroot/js/bootstrap.blazor.bundle.min.js</BootstrapTargetJsFile>
<StyleFile>$(MSBuildThisFileDirectory)wwwroot/css/bootstrapblazor.min.css</StyleFile>
<BundleStyleFile>$(MSBuildThisFileDirectory)wwwroot/css/bootstrap.blazor.bundle.min.css;$(MSBuildThisFileDirectory)wwwroot/css/bootstrap.blazor.bundle.rtl.min.css</BundleStyleFile>
</PropertyGroup>

<Target Name="CopyCss" AfterTargets="Build" Condition="'$(TargetFramework)' == '$(RunTargetFramework)'">
<Target Name="CopyJs" AfterTargets="Build" Condition="'$(TargetFramework)' == '$(RunTargetFramework)'" Inputs="$(BootstrapOriginJsFile)" Outputs="$(BootstrapTargetJsFile)">
<Message Text="Copy bootstrap.bundle.min.js ..." Importance="high"></Message>
<Copy SourceFiles="$(BootstrapBundleFile)" DestinationFiles="$(TargetBootstrapBundleFile)" SkipUnchangedFiles="true"></Copy>
<Copy SourceFiles="$(BootstrapOriginJsFile)" DestinationFiles="$(BootstrapTargetJsFile)" SkipUnchangedFiles="true"></Copy>
</Target>

<Target Name="CssBundler" AfterTargets="CopyJs" Condition="'$(TargetFramework)' == '$(RunTargetFramework)'" Inputs="$(StyleFile)" Outputs="$(BundleStyleFile)">
<Exec Command="dotnet tool restore"></Exec>
<Message Text="Bundler min css ..." Importance="high"></Message>
<Exec Command="dotnet css-bundler .\bundler.json"></Exec>
</Target>

</Project>
20 changes: 20 additions & 0 deletions src/BootstrapBlazor/bundler.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
[
{
"outputFileName": "wwwroot/css/bootstrap.blazor.bundle.min.css",
"inputFiles": [
"wwwroot/core/bootstrap/css/bootstrap.min.css",
"wwwroot/css/bootstrapblazor.min.css",
"wwwroot/lib/animate/animate.min.css",
"wwwroot/lib/swal/sweetalert2.min.css"
]
},
{
"outputFileName": "wwwroot/css/bootstrap.blazor.bundle.rtl.min.css",
"inputFiles": [
"wwwroot/core/bootstrap/css/bootstrap.rtl.min.css",
"wwwroot/css/bootstrapblazor.min.css",
"wwwroot/lib/animate/animate.min.css",
"wwwroot/lib/swal/sweetalert2.min.css"
]
}
]

This file was deleted.

This file was deleted.

Loading