maliming
5 years ago
No known key found for this signature in database
GPG Key ID: 96224957E51C89E
1 changed files with
7 additions and
2 deletions
-
framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Bundling/BundlerBase.cs
|
|
|
@ -41,7 +41,7 @@ namespace Volo.Abp.Cli.Bundling |
|
|
|
return GenerateDefinition(bundleFilePath,fileDefinitionsExcludingFromBundle); |
|
|
|
} |
|
|
|
|
|
|
|
private bool IsMinFile(string fileName) |
|
|
|
private bool IsMinFile(string fileName, string content) |
|
|
|
{ |
|
|
|
foreach (var suffix in _minFileSuffixes) |
|
|
|
{ |
|
|
|
@ -51,6 +51,11 @@ namespace Volo.Abp.Cli.Bundling |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
if (content.IndexOf(Environment.NewLine, StringComparison.Ordinal) < 10) |
|
|
|
{ |
|
|
|
return true; |
|
|
|
} |
|
|
|
|
|
|
|
return false; |
|
|
|
} |
|
|
|
|
|
|
|
@ -117,7 +122,7 @@ namespace Volo.Abp.Cli.Bundling |
|
|
|
private string GetFileContent(string filePath, bool minify) |
|
|
|
{ |
|
|
|
var content = File.ReadAllText(filePath); |
|
|
|
if (minify && !IsMinFile(filePath)) |
|
|
|
if (minify && !IsMinFile(filePath, content)) |
|
|
|
{ |
|
|
|
try |
|
|
|
{ |
|
|
|
|