Skip to content

Commit 606c50b

Browse files
authored
Added module manifest code snippet
- [x] Added a PowerShell code snippet to `PowerShell.json`, for a module manifest skeleton
1 parent f8822bb commit 606c50b

File tree

1 file changed

+62
-1
lines changed

1 file changed

+62
-1
lines changed

snippets/PowerShell.json

+62-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,65 @@
11
{
2+
"ModuleManifest": {
3+
"prefix": "manifest",
4+
"body": [
5+
"@{",
6+
"\t# If authoring a script module, the RootModule is your .psm1 file",
7+
"\tRootModule = '${module:MyModule}.psm1'",
8+
"",
9+
"\tAuthor = '${author:Cool Person <[email protected]>}",
10+
"",
11+
"\tCompanyName = '${company:Contoso Inc.}'",
12+
"",
13+
"\tModuleVersion = '${ModuleVersion:0.1}'",
14+
"",
15+
"\tGUID = '<pasteNewGUIDhere>'",
16+
"",
17+
"\tCopyright = '2017 ${company:Copyright Holder}",
18+
"",
19+
"\tDescription = '${Description:What does this module do?}'",
20+
"",
21+
"\t# Minimum PowerShell version supported by this module (optional, recommended)",
22+
"\t# PowerShellVersion = ''",
23+
"",
24+
"\t# Which PowerShell Editions does this module work with? (Core, Desktop)",
25+
"\tCompatiblePSEditions = @('Desktop', 'Core')",
26+
"",
27+
"\t# Which PowerShell functions are exported from your module? (eg. Get-CoolObject)",
28+
"\tFunctionsToExport = @('')",
29+
"",
30+
"\t# Which PowerShell aliases are exported from your module? (eg. gco)",
31+
"\tAliasesToExport = @('')",
32+
"",
33+
"\t# Which PowerShell variables are exported from your module? (eg. Fruits, Vegetables)",
34+
"\tVariablesToExport = @('')",
35+
"",
36+
"\t# PowerShell Gallery: Define your module's metadata",
37+
"\tPrivateData = @{",
38+
"\t\tPSData = @{",
39+
"\t\t\t# What keywords represent your PowerShell module? (eg. cloud, tools, framework, vendor)",
40+
"\t\t\tTags = @('${tag1:cooltag1}', '${tag2:cooltag2}')",
41+
"",
42+
"\t\t\t# What software license is your code being released under? (see https://opensource.org/licenses)",
43+
"\t\t\tLicenseUri = ''",
44+
"",
45+
"\t\t\t# What is the URL to your project's website?",
46+
"\t\t\tProjectUri = ''",
47+
"",
48+
"\t\t\t# What is the URI to a custom icon file for your project? (optional)",
49+
"\t\t\tIconUri = ''",
50+
"",
51+
"\t\t\t# What new features, bug fixes, or deprecated features, are part of this release?",
52+
"\t\t\tReleaseNotes = @'",
53+
"'@",
54+
"\t\t}",
55+
"\t}",
56+
"",
57+
"\t# If your module supports updateable help, what is the URI to the help archive? (optional)",
58+
"\t# HelpInfoURI = ''",
59+
"}"
60+
],
61+
"description": "Basic skeleton for a PowerShell module manifest, complete with PowerShell Gallery metadata."
62+
},
263
"Example-Class": {
364
"prefix": "ex-class",
465
"body": [
@@ -810,4 +871,4 @@
810871
],
811872
"description": "sequence snippet (for use inside a workflow)"
812873
}
813-
}
874+
}

0 commit comments

Comments
 (0)