1
0
mirror of https://github.com/chylex/TweetDuck.git synced 2025-04-15 06:15:47 +02:00

Fix configuration.default.js files being minified on build

This commit is contained in:
chylex 2017-09-14 19:40:41 +02:00
parent 36bede7211
commit 3cdc1e190a

View File

@ -11,7 +11,7 @@ function Rewrite-File{
Write-Host "Processed" $file.FullName.Substring($dir.Length)
}
ForEach($file in Get-ChildItem -Include *.js -Recurse){
ForEach($file in Get-ChildItem -Include *.js -Exclude configuration.default.js -Recurse){
$lines = Get-Content -Path $file.FullName
$lines = ($lines | % { $_.TrimStart() }) -Replace '^(.*?)((?<=^|[;{}()])\s?//(?:\s.*|$))?$', '$1' -Replace '(?<!\w)return(\s.*?)? if (.*?);', 'if ($2)return$1;'
,$lines | Rewrite-File $file