Skip to content

Commit 5343596

Browse files
committed
0.1.6 Release
1 parent 9f75853 commit 5343596

39 files changed

Lines changed: 553 additions & 159 deletions

ModuleBuild.psd1

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
#
44
# Generated by: Zachary Loeber
55
#
6-
# Generated on: 7/12/2017
6+
# Generated on: 9/21/2017
77
#
88

99
@{
@@ -12,7 +12,7 @@
1212
RootModule = 'ModuleBuild.psm1'
1313

1414
# Version number of this module.
15-
ModuleVersion = '0.1.6'
15+
ModuleVersion = '0.1.7'
1616

1717
# Supported PSEditions
1818
# CompatiblePSEditions = @()
@@ -107,7 +107,7 @@ PrivateData = @{
107107
IconUri = 'https://github.com/zloeber/ModuleBuild/raw/master/src/other/powershell-project.png'
108108

109109
# ReleaseNotes of this module
110-
ReleaseNotes = '0.1.6 release'
110+
ReleaseNotes = '0.1.7 release'
111111

112112
# External dependent modules of this module
113113
# ExternalModuleDependencies = ''

build/ModuleBuild.buildenvironment.ps1

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ if ((Get-Variable 'BuildEnv' -ErrorAction:SilentlyContinue) -eq $null) {
5757
BaseReleaseFolder = 'release' # Releases directory.
5858
BuildToolFolder = 'build' # Build tool path (these scripts are dot sourced)
5959
ScratchFolder = 'temp' # Scratch path - this is where all our scratch work occurs. It will be cleared out at every run.
60+
FunctionTemplates = "src\templates" # Location of function template files (*.tem)
6061

6162
# If you will be publishing to the PowerShell Gallery you will need a Nuget API key (can get from the website)
6263
# You should not actually enter this key here but should manually enter it in the ModuleBuild.buildenvironment.json file

build/docs/Additional/ChangeLog.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,3 +61,7 @@ Project Site: [https://github.com/zloeber/ModuleBuild](https://github.com/zloebe
6161
- Fixed awful .gitignore settings included in the default scaffolding
6262
- Fixed documentation links to be self-referencing
6363
- Removed AdditionalModulePaths from initial plaster manifest (can just set this with set-buildenvironment after creation)
64+
65+
## Version 0.1.6
66+
- Added New-PublicFunction to module along with a template folder and basic function template to start with. Any src\templates\*.tem file is able to be used for this new feature and any build environment variable surrounded by double percentage symbols will be automatically replaced (ie. %%ModuleName%%).
67+
- Fixed ReadTheDocs yml creation issue with the licensing link.

docs/ChangeLog.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,3 +61,7 @@ Project Site: [https://github.com/zloeber/ModuleBuild](https://github.com/zloebe
6161
- Fixed awful .gitignore settings included in the default scaffolding
6262
- Fixed documentation links to be self-referencing
6363
- Removed AdditionalModulePaths from initial plaster manifest (can just set this with set-buildenvironment after creation)
64+
65+
## Version 0.1.6
66+
- Added New-PublicFunction to module along with a template folder and basic function template to start with. Any src\templates\*.tem file is able to be used for this new feature and any build environment variable surrounded by double percentage symbols will be automatically replaced (ie. %%ModuleName%%).
67+
- Fixed ReadTheDocs yml creation issue with the licensing link.

docs/Functions/Add-PublicFunction.md

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@ schema: 2.0.0
77
# Add-PublicFunction
88

99
## SYNOPSIS
10-
Adds a public function to your modulebuild based project.
10+
Adds a public function to your modulebuild based project based on defined templates.
1111

1212
## SYNTAX
1313

1414
```
15-
Add-PublicFunction [[-Name] <String>] [-Force]
15+
Add-PublicFunction [[-Name] <String>] [-Force] [-TemplateName <String>]
1616
```
1717

1818
## DESCRIPTION
@@ -58,6 +58,21 @@ Accept pipeline input: False
5858
Accept wildcard characters: False
5959
```
6060
61+
### -TemplateName
62+
Use this template file for the new function
63+
64+
```yaml
65+
Type: String
66+
Parameter Sets: (All)
67+
Aliases:
68+
69+
Required: False
70+
Position: Named
71+
Default value: None
72+
Accept pipeline input: False
73+
Accept wildcard characters: False
74+
```
75+
6176
## INPUTS
6277
6378
## OUTPUTS

docs/Functions/Set-BuildEnvironment.md

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,11 @@ Sets a stored setting in a buildenvironment.json file.
1414
```
1515
Set-BuildEnvironment [[-Path] <String>] [-AdditionalModulePaths <Object[]>] [-BaseReleaseFolder <String>]
1616
[-BaseSourceFolder <String>] [-BuildToolFolder <String>] [-Encoding <String>] [-FirstRun <Boolean>]
17-
[-Force <Boolean>] [-ForceInstallModule <Boolean>] [-ModuleAuthor <String>] [-ModuleCopyright <String>]
18-
[-ModuleDescription <String>] [-ModuleLicenseURI <String>] [-ModuleTags <Object[]>] [-ModuleToBuild <String>]
19-
[-ModuleVersion <String>] [-ModuleWebsite <String>] [-NugetAPIKey <String>] [-OptionAnalyzeCode <Boolean>]
20-
[-OptionCombineFiles <Boolean>] [-OptionGenerateReadTheDocs <Boolean>] [-OptionRunPlatyPSVerbose <Boolean>]
17+
[-Force <Boolean>] [-ForceInstallModule <Boolean>] [-FunctionTemplates <String>] [-ModuleAuthor <String>]
18+
[-ModuleCopyright <String>] [-ModuleDescription <String>] [-ModuleLicenseURI <String>]
19+
[-ModuleTags <Object[]>] [-ModuleToBuild <String>] [-ModuleVersion <String>] [-ModuleWebsite <String>]
20+
[-NugetAPIKey <String>] [-OptionAnalyzeCode <Boolean>] [-OptionCombineFiles <Boolean>]
21+
[-OptionGenerateReadTheDocs <Boolean>] [-OptionRunPlatyPSVerbose <Boolean>]
2122
[-OptionSanitizeSensitiveTerms <Boolean>] [-OptionSensitiveTerms <Object[]>]
2223
[-OptionSensitiveTermsInitialized <Boolean>] [-OptionTranscriptEnabled <Boolean>]
2324
[-OptionTranscriptLogFile <String>] [-OptionUpdateVersionAfterPublishing <Boolean>]
@@ -172,6 +173,21 @@ Accept pipeline input: True (ByValue)
172173
Accept wildcard characters: False
173174
```
174175
176+
### -FunctionTemplates
177+
Update the setting for FunctionTemplates
178+
179+
```yaml
180+
Type: String
181+
Parameter Sets: (All)
182+
Aliases:
183+
184+
Required: False
185+
Position: Named
186+
Default value: None
187+
Accept pipeline input: True (ByValue)
188+
Accept wildcard characters: False
189+
```
190+
175191
### -ModuleAuthor
176192
Update the setting for ModuleAuthor
177193

mkdocs.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,10 @@ pages:
1919
- 6 - Your Next Release: Usage/6 - Your Next Release.md
2020
- 7 - Project Documentation: Usage/7 - Project Documentation.md
2121
- 8 - Special Files: Usage/8 - Special Files.md
22-
- 9 - PSModuleBuild Configuration: Usage/9 - PSModuleBuild Configuration.md
22+
- 9 - PSModuleBuild Configuration: Usage/9 - ModuleBuild Configuration.md
2323
- 10 - Converting To ModuleBuild: Usage/10 - Converting To ModuleBuild.md
2424
- Functions:
25+
- Add-PublicFunction: Functions/Add-PublicFunction.md
2526
- Get-BuildEnvironment: Functions/Get-BuildEnvironment.md
2627
- Import-ModulePrivateFunction: Functions/Import-ModulePrivateFunction.md
2728
- Import-ModulePublicFunction: Functions/Import-ModulePublicFunction.md

plaster/ModuleBuild/plasterManifest.xml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
templateType="Project" xmlns="http://www.microsoft.com/schemas/PowerShell/Plaster/v1">
55
<metadata>
66
<name>ModuleBuild</name>
7-
<id>885a2cea-4109-4442-b8a3-c0514e2113a2</id>
7+
<id>a30d2819-c662-45c6-a142-d608cd0874e8</id>
88
<version>0.0.8</version>
99
<title>New ModuleBuild Project</title>
1010
<description>Create a new PowerShell Module with a ModuleBuild wrapper</description>
@@ -165,6 +165,9 @@
165165
<file
166166
source="scaffold\src\public\*"
167167
destination="src\public" />
168+
<file
169+
source="scaffold\src\templates\*"
170+
destination="src\templates" />
168171
<file
169172
source="scaffold\tests\*"
170173
destination="src\tests" />

plaster/ModuleBuild/scaffold/build/modulename.buildenvironment.template

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ if ((Get-Variable 'BuildEnv' -ErrorAction:SilentlyContinue) -eq $null) {
5858
BaseReleaseFolder = 'release' # Releases directory.
5959
BuildToolFolder = 'build' # Build tool path (these scripts are dot sourced)
6060
ScratchFolder = 'temp' # Scratch path - this is where all our scratch work occurs. It will be cleared out at every run.
61+
FunctionTemplates = "src\templates" # Location of function template files (*.tem)
6162

6263
# If you will be publishing to the PowerShell Gallery you will need a Nuget API key (can get from the website)
6364
# You should not actually enter this key here but should manually enter it in the <%=$PLASTER_PARAM_ModuleName%>.buildenvironment.json file
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
function %%FunctionName%% {
2+
<#
3+
.SYNOPSIS
4+
TBD
5+
.DESCRIPTION
6+
TBD
7+
.LINK
8+
%%ModuleWebsite%%
9+
.EXAMPLE
10+
TBD
11+
.NOTES
12+
Author: %%ModuleAuthor%%
13+
#>
14+
15+
[CmdletBinding()]
16+
param(
17+
)
18+
begin {
19+
if ($script:ThisModuleLoaded -eq $true) {
20+
Get-CallerPreference -Cmdlet $PSCmdlet -SessionState $ExecutionContext.SessionState
21+
}
22+
$FunctionName = $MyInvocation.MyCommand.Name
23+
Write-Verbose "$($FunctionName): Begin."
24+
}
25+
process {
26+
}
27+
end {
28+
Write-Verbose "$($FunctionName): End."
29+
}
30+
}

0 commit comments

Comments
 (0)