Skip to content

Commit 1acd686

Browse files
authored
Initial dotnet template "ModuleBuilderModule"
Merge pull request #77 from bravo-kernel/dotnet-template
2 parents eb6c601 + 6e5612e commit 1acd686

16 files changed

Lines changed: 173 additions & 0 deletions

File tree

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# EditorConfig is awesome: http://EditorConfig.org
2+
#
3+
# Copied from https://github.com/PowerShell/PowerShellEditorServices/blob/master/.editorconfig
4+
5+
# top-most EditorConfig file
6+
root = true
7+
8+
[*]
9+
charset = utf-8
10+
indent_style = space
11+
insert_final_newline = true
12+
13+
[*.{cs}]
14+
indent_size = 4
15+
trim_trailing_whitespace = true
16+
17+
[*.{json}]
18+
indent_size = 2
19+
trim_trailing_whitespace = true
20+
21+
[*.{ps1,psm1,psd1}]
22+
indent_size = 4
23+
trim_trailing_whitespace = true
24+
25+
[*.{ps1xml,props,xml,yaml}]
26+
indent_size = 2
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Define the line ending behavior of the different file extensions
2+
# Set default behavior, in case users don't have core.autocrlf set.
3+
* text=auto
4+
* text eol=lf
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# ignore the build folder
2+
Output/
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
{
2+
"$schema": "http://json.schemastore.org/template",
3+
"identity": "PoshCode.ModuleBuilderModule",
4+
"author": "PoshCode",
5+
"tags": {
6+
"language": "Powershell",
7+
"type": "project"
8+
},
9+
"classifications": ["Powershell", "Modules"],
10+
"name": "ModuleBuilder Module Generator",
11+
"shortName": "ModuleBuilderModule",
12+
"symbols": {
13+
"moduleName": {
14+
"type": "parameter",
15+
"datatype": "string",
16+
"description": "Name of your new Powershell Module",
17+
"replaces": "{moduleName}",
18+
"isRequired": true
19+
}
20+
},
21+
"postActions": [
22+
{
23+
"actionId": "3A7C4B45-1F5D-4A30-959A-51B88E82B5D2",
24+
"args": {
25+
"executable": "powershell",
26+
"args": "./dotnet-post-action.ps1"
27+
},
28+
"manualInstructions": [
29+
{
30+
"text": "Generate Manifest"
31+
}
32+
],
33+
"continueOnError": false,
34+
"description ": "Generates a basic Module Manifest"
35+
}
36+
]
37+
}
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
mode: Mainline
2+
commit-message-incrementing: MergeMessageOnly
3+
assembly-versioning-format: '{Major}.{Minor}.{Patch}.{env:BUILDCOUNT ?? 0}'
4+
assembly-informational-format: '{NuGetVersionV2}+Build.{env:BUILDCOUNT ?? 0}.Date.{CommitDate}.Branch.{env:SAFEBRANCHNAME ?? unknown}.Sha.{Sha}'
5+
next-version: 1.0.0
6+
branches:
7+
master:
8+
increment: Patch
9+
pull-request:
10+
tag: rc
11+
increment: Patch
12+
features:
13+
increment: Patch
14+
regex: .*?/
15+
source-branches:
16+
- master
17+
- features
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# {moduleName}
2+
3+
## Requirements
4+
5+
```posh
6+
Install-Script -Name Install-RequiredModule
7+
```
8+
9+
## Building your module
10+
11+
1. run `Install-RequiredModule`
12+
13+
2. add `.ps1` script files to the `Source` folder
14+
15+
3. run `Build-Module .\Source`
16+
17+
4. compiled module appears in the `Output` folder
18+
19+
## Versioning
20+
21+
ModuleBuilder will automatically apply the next semver version
22+
if you have installed [gitversion](https://gitversion.readthedocs.io/en/latest/).
23+
24+
To manually create a new version run `Build-Module .\Source -SemVer 0.0.2`
25+
26+
## Additional Information
27+
28+
https://github.com/PoshCode/ModuleBuilder
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# todo: add explanation
2+
@{
3+
ModuleBuilder = "1.*"
4+
Pester = "[4.7.2, 5.0)"
5+
}

Templates/Dotnet/ModuleBuilderModule/Source/Classes/.gitkeep

Whitespace-only changes.

Templates/Dotnet/ModuleBuilderModule/Source/Enum/.gitkeep

Whitespace-only changes.

Templates/Dotnet/ModuleBuilderModule/Source/Private/.gitkeep

Whitespace-only changes.

0 commit comments

Comments
 (0)