Skip to content

Commit 02d8856

Browse files
committed
chore: ✨ Update VSCode settings and changelog
* Added new PowerShell code formatting options in `.vscode/settings.json` * Cleaned up and reorganized entries in `CHANGELOG.md` * Improved code readability in `psakeFile.ps1` with consistent formatting
1 parent b6466f4 commit 02d8856

File tree

3 files changed

+38
-34
lines changed

3 files changed

+38
-34
lines changed

.vscode/settings.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,9 @@
22
"editor.insertSpaces": true,
33
"files.trimTrailingWhitespace": true,
44
"files.insertFinalNewline": true,
5-
"powershell.codeFormatting.preset": "OTBS"
5+
"powershell.codeFormatting.preset": "OTBS",
6+
"powershell.codeFormatting.addWhitespaceAroundPipe": true,
7+
"powershell.codeFormatting.useCorrectCasing": true,
8+
"powershell.codeFormatting.newLineAfterOpenBrace": true,
9+
"powershell.codeFormatting.alignPropertyValuePairs": true
610
}

CHANGELOG.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -137,13 +137,6 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
137137
'Public' folder when dot sourcing functions in PSM1 (via
138138
[@pauby](https://github.com/pauby))
139139

140-
### Changed
141-
142-
- [**#19**](https://github.com/psake/PowerShellBuild/pull/19) Allow the
143-
`BHBuildOutput` environment variable defined by `BuildHelpers` to be set via
144-
the `$PSBPreference.Build.ModuleOutDir` property of the build tasks (via
145-
[@pauby](https://github.com/pauby))
146-
147140
### Breaking changes
148141

149142
- Refactor build properties into a single hashtable `$PSBPreference`
@@ -154,6 +147,11 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
154147
tasks are now auto-generated from the psake tasks via a converter script (via
155148
[@JustinGrote](https://github.com/JustinGrote))
156149

150+
- [**#19**](https://github.com/psake/PowerShellBuild/pull/19) Allow the
151+
`BHBuildOutput` environment variable defined by `BuildHelpers` to be set via
152+
the `$PSBPreference.Build.ModuleOutDir` property of the build tasks (via
153+
[@pauby](https://github.com/pauby))
154+
157155
## [0.2.0] - 2018-11-15
158156

159157
### Added
@@ -174,3 +172,5 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
174172
### Added
175173

176174
- Initial commit
175+
176+
<!--spell-checker:ignore IMJLA webtroter joshooaj pauby joeypiccola nightroman -->

PowerShellBuild/psakeFile.ps1

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
1+
# spell-checker:ignore Reqs
22
# Load in build settings
33
Remove-Variable -Name PSBPreference -Scope Script -Force -ErrorAction Ignore
44
Set-Variable -Name PSBPreference -Option ReadOnly -Scope Script -Value (. ([IO.Path]::Combine($PSScriptRoot, 'build.properties.ps1')))
@@ -25,14 +25,14 @@ Task Clean -depends $PSBPreference.TaskDependencies.Clean {
2525

2626
Task StageFiles -depends $PSBPreference.TaskDependencies.StageFiles {
2727
$buildParams = @{
28-
Path = $PSBPreference.General.SrcRootDir
29-
ModuleName = $PSBPreference.General.ModuleName
30-
DestinationPath = $PSBPreference.Build.ModuleOutDir
31-
Exclude = $PSBPreference.Build.Exclude
32-
Compile = $PSBPreference.Build.CompileModule
28+
Path = $PSBPreference.General.SrcRootDir
29+
ModuleName = $PSBPreference.General.ModuleName
30+
DestinationPath = $PSBPreference.Build.ModuleOutDir
31+
Exclude = $PSBPreference.Build.Exclude
32+
Compile = $PSBPreference.Build.CompileModule
3333
CompileDirectories = $PSBPreference.Build.CompileDirectories
34-
CopyDirectories = $PSBPreference.Build.CopyDirectories
35-
Culture = $PSBPreference.Help.DefaultLocale
34+
CopyDirectories = $PSBPreference.Build.CopyDirectories
35+
Culture = $PSBPreference.Help.DefaultLocale
3636
}
3737

3838
if ($PSBPreference.Help.ConvertReadMeToAboutHelp) {
@@ -69,9 +69,9 @@ $analyzePreReqs = {
6969
}
7070
Task Analyze -depends $PSBPreference.TaskDependencies.Analyze -precondition $analyzePreReqs {
7171
$analyzeParams = @{
72-
Path = $PSBPreference.Build.ModuleOutDir
72+
Path = $PSBPreference.Build.ModuleOutDir
7373
SeverityThreshold = $PSBPreference.Test.ScriptAnalysis.FailBuildOnSeverityLevel
74-
SettingsPath = $PSBPreference.Test.ScriptAnalysis.SettingsPath
74+
SettingsPath = $PSBPreference.Test.ScriptAnalysis.SettingsPath
7575
}
7676
Test-PSBuildScriptAnalysis @analyzeParams
7777
} -description 'Execute PSScriptAnalyzer tests'
@@ -94,17 +94,17 @@ $pesterPreReqs = {
9494
}
9595
Task Pester -depends $PSBPreference.TaskDependencies.Pester -precondition $pesterPreReqs {
9696
$pesterParams = @{
97-
Path = $PSBPreference.Test.RootDir
98-
ModuleName = $PSBPreference.General.ModuleName
99-
ModuleManifest = Join-Path $PSBPreference.Build.ModuleOutDir "$($PSBPreference.General.ModuleName).psd1"
100-
OutputPath = $PSBPreference.Test.OutputFile
101-
OutputFormat = $PSBPreference.Test.OutputFormat
102-
CodeCoverage = $PSBPreference.Test.CodeCoverage.Enabled
103-
CodeCoverageThreshold = $PSBPreference.Test.CodeCoverage.Threshold
104-
CodeCoverageFiles = $PSBPreference.Test.CodeCoverage.Files
105-
CodeCoverageOutputFile = $PSBPreference.Test.CodeCoverage.OutputFile
97+
Path = $PSBPreference.Test.RootDir
98+
ModuleName = $PSBPreference.General.ModuleName
99+
ModuleManifest = Join-Path $PSBPreference.Build.ModuleOutDir "$($PSBPreference.General.ModuleName).psd1"
100+
OutputPath = $PSBPreference.Test.OutputFile
101+
OutputFormat = $PSBPreference.Test.OutputFormat
102+
CodeCoverage = $PSBPreference.Test.CodeCoverage.Enabled
103+
CodeCoverageThreshold = $PSBPreference.Test.CodeCoverage.Threshold
104+
CodeCoverageFiles = $PSBPreference.Test.CodeCoverage.Files
105+
CodeCoverageOutputFile = $PSBPreference.Test.CodeCoverage.OutputFile
106106
CodeCoverageOutputFileFormat = $PSBPreference.Test.CodeCoverage.OutputFileFormat
107-
ImportModule = $PSBPreference.Test.ImportModule
107+
ImportModule = $PSBPreference.Test.ImportModule
108108
}
109109
Test-PSBuildPester @pesterParams
110110
} -description 'Execute Pester tests'
@@ -126,9 +126,9 @@ Task GenerateMarkdown -depends $PSBPreference.TaskDependencies.GenerateMarkdown
126126
$buildMDParams = @{
127127
ModulePath = $PSBPreference.Build.ModuleOutDir
128128
ModuleName = $PSBPreference.General.ModuleName
129-
DocsPath = $PSBPreference.Docs.RootDir
130-
Locale = $PSBPreference.Help.DefaultLocale
131-
Overwrite = $PSBPreference.Docs.Overwrite
129+
DocsPath = $PSBPreference.Docs.RootDir
130+
Locale = $PSBPreference.Help.DefaultLocale
131+
Overwrite = $PSBPreference.Docs.Overwrite
132132
}
133133
Build-PSBuildMarkdown @buildMDParams
134134
} -description 'Generates PlatyPS markdown files from module help'
@@ -161,10 +161,10 @@ Task Publish -depends $PSBPreference.TaskDependencies.Publish {
161161
Assert -conditionToCheck ($PSBPreference.Publish.PSRepositoryApiKey -or $PSBPreference.Publish.PSRepositoryCredential) -failureMessage "API key or credential not defined to authenticate with [$($PSBPreference.Publish.PSRepository)] with."
162162

163163
$publishParams = @{
164-
Path = $PSBPreference.Build.ModuleOutDir
165-
Version = $PSBPreference.General.ModuleVersion
164+
Path = $PSBPreference.Build.ModuleOutDir
165+
Version = $PSBPreference.General.ModuleVersion
166166
Repository = $PSBPreference.Publish.PSRepository
167-
Verbose = $VerbosePreference
167+
Verbose = $VerbosePreference
168168
}
169169
if ($PSBPreference.Publish.PSRepositoryApiKey) {
170170
$publishParams.ApiKey = $PSBPreference.Publish.PSRepositoryApiKey

0 commit comments

Comments
 (0)