33Add-Type - AssemblyName ' System.IO.Compression.FileSystem'
44
55function New-Package (
6- $directory = ' .' ,
7- [switch ]$recurse ,
6+ $directory = ' .' ,
7+ [switch ]$recurse ,
88 $outputPath = ' _InstallPackages' )
99{
1010 if ($directory -is [string ]) {
@@ -17,7 +17,7 @@ function New-Package(
1717 if ($outputPath -is [string ]) {
1818 $outputPath = Resolve-Path $outputPath
1919 } elseif ($outputPath -is [System.IO.DirectoryInfo ]) {
20- $outputPath = Resolve-Path $outputPath.FullName
20+ $outputPath = Resolve-Path $outputPath.FullName
2121 }
2222 # Write-Host ('output path is ' + $outputPath.Path)
2323
@@ -63,7 +63,7 @@ function New-BowerLibrary ($name) {
6363 }
6464 if ($jsPaths.Count -gt 1 ) {
6565 Write-Warning ' Package contains multiple JS files, only the first will be listed in the package'
66- }
66+ }
6767
6868 $jsFile = $jsPaths [0 ]
6969 $jsFolder = [System.IO.Path ]::GetDirectoryName($jsFile )
@@ -99,7 +99,7 @@ function New-JavaScriptLibrary ($name, $version, $jsFileName, $friendlyName) {
9999
100100 $versionedFolder = " $ ( $name ) _$version "
101101 mkdir $versionedFolder | Out-Null
102-
102+
103103 $manifestFile = " $versionedFolder \$name .dnn"
104104 cp _template\library.dnn $manifestFile
105105 $changesFile = " $versionedFolder \CHANGES.htm"
@@ -167,7 +167,7 @@ function Update-BowerLibrary ($name, $version = $null) {
167167 }
168168 if ($jsPaths.Count -gt 1 ) {
169169 Write-Warning ' Package contains multiple JS files, only the first will be listed in the package'
170- }
170+ }
171171
172172 $jsFile = $jsPaths [0 ]
173173 $jsFolder = [System.IO.Path ]::GetDirectoryName($jsFile )
@@ -206,8 +206,8 @@ function Update-JavaScriptLibrary ($name, $newVersion) {
206206}
207207
208208function ReplaceTokens ($file , $name , $friendlyName , $version , $fileName ) {
209- (Get-Content $file ) |
210- % { $_ -replace ' \[name\]' , $name -replace ' \[friendlyName\]' , $friendlyName -replace ' \[version\]' , $version -replace ' \[file\]' , $fileName } |
209+ (Get-Content $file ) |
210+ % { $_ -replace ' \[name\]' , $name -replace ' \[friendlyName\]' , $friendlyName -replace ' \[version\]' , $version -replace ' \[file\]' , $fileName } |
211211 Set-Content $file
212212 }
213213
0 commit comments