Skip to content

Commit f5570f6

Browse files
committed
Use .min.js file for new libraries
1 parent f3477db commit f5570f6

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

JsLibraryPackaging.psm1

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,13 @@ function New-BowerLibrary ($name) {
6666
}
6767

6868
$jsFile = $jsPaths[0]
69+
$jsFolder = [System.IO.Path]::GetDirectoryName($jsFile)
70+
$jsFileName = [System.IO.Path]::GetFileNameWithoutExtension($jsFile)
71+
$minJsFile = [System.IO.Path]::Combine($jsFolder, $jsFileName + '.min.js')
72+
if (Test-Path $minJsFile) {
73+
$jsFile = $minJsFile
74+
}
75+
6976
$fileName = Split-Path $jsFile -Leaf
7077

7178
$versionedFolder = New-JavaScriptLibrary $name $version $fileName

0 commit comments

Comments
 (0)