File tree Expand file tree Collapse file tree
src/tools/BootstrapBlazor.CssBundler Expand file tree Collapse file tree Original file line number Diff line number Diff line change 22// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
33// Website: https://www.blazor.zone or https://argozhang.github.io/
44
5+ using System . Text ;
6+
57namespace BootstrapBlazor . CssBundler ;
68
79internal class Bundler
@@ -30,8 +32,16 @@ public static void Run(string[] args)
3032
3133 static void BundlerCore ( string bundlerFile )
3234 {
33- var option = BundlerOptions . LoadFromConfigFile ( bundlerFile ) ;
35+ var options = BundlerOptions . LoadFromConfigFile ( bundlerFile ) ;
36+
37+ foreach ( var option in options )
38+ {
39+ DoBundler ( bundlerFile , option ) ;
40+ }
41+ }
3442
43+ static void DoBundler ( string bundlerFile , BundlerOptions option )
44+ {
3545 if ( string . IsNullOrEmpty ( option . OutputFileName ) )
3646 {
3747 return ;
@@ -58,7 +68,8 @@ static void BundlerCore(string bundlerFile)
5868 }
5969
6070 using var reader = File . OpenText ( inputFile ) ;
61- reader . BaseStream . CopyTo ( writer ) ;
71+ var content = reader . ReadToEnd ( ) ;
72+ writer . Write ( Encoding . UTF8 . GetBytes ( content ) ) ;
6273 reader . Close ( ) ;
6374 }
6475 writer . Close ( ) ;
You can’t perform that action at this time.
0 commit comments