-
Notifications
You must be signed in to change notification settings - Fork 43
New SampleModule
Create a module scaffolding and add samples & build pipeline.
New-SampleModule -DestinationPath <String> [-ModuleType <String>] [-ModuleAuthor <String>] -ModuleName <String>
[-ModuleDescription <String>] [-CustomRepo <String>] [-ModuleVersion <String>] [-LicenseType <String>]
[-SourceDirectory <String>] [<CommonParameters>]
New-SampleModule -DestinationPath <String> [-ModuleAuthor <String>] -ModuleName <String>
[-ModuleDescription <String>] [-CustomRepo <String>] [-ModuleVersion <String>] [-LicenseType <String>]
[-SourceDirectory <String>] [-Features <String[]>] [<CommonParameters>]
New-SampleModule helps you bootstrap your PowerShell module project by creating a the folder structure of your module, and optionally add the pipeline files to help with compiling the module, publishing to PSGallery and GitHub and testing quality and style such as per the DSC Community guildelines.
New-SampleModule -DestinationPath . -ModuleType CompleteSample -ModuleAuthor "Gael Colas" -ModuleName MyModule -ModuleVersion 0.0.1 -ModuleDescription "a sample module" -LicenseType MIT -SourceDirectory Source
The Custom PS repository if you want to use an internal (private) feed to pull for dependencies.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: PSGallery
Accept pipeline input: False
Accept wildcard characters: False
Destination of your module source root folder, defaults to the current directory ".". We assume that your current location is the module folder, and within this folder we will find the source folder, the tests folder and other supporting files.
Type: String
Parameter Sets: (All)
Aliases: Path
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
If you'd rather select specific features from this template to build your module, use this parameter instead.
Type: String[]
Parameter Sets: ByFeature
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Type of license you would like to add to your repository. We recommend MIT for Open Source projects.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: MIT
Accept pipeline input: False
Accept wildcard characters: False
The author of module that will be populated in the Module Manifest and will show in the Gallery.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: $env:USERNAME
Accept pipeline input: False
Accept wildcard characters: False
The Description of your Module, to be used in your Module manifest.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
The Name of your Module.
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Specifies the type of module to create. The default value is 'SimpleModule'. Preset of module you would like to create: - CompleteSample - SimpleModule - SimpleModule_NoBuild - dsccommunity
Type: String
Parameter Sets: ByModuleType
Aliases:
Required: False
Position: Named
Default value: SimpleModule
Accept pipeline input: False
Accept wildcard characters: False
Version you want to set in your Module Manifest. If you follow our approach, this will be updated during compilation anyway.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: 0.0.1
Accept pipeline input: False
Accept wildcard characters: False
How you would like to call your Source repository to differentiate from the output and the tests folder. We recommend to call it 'source', and the default value is 'source'.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: Source
Accept pipeline input: False
Accept wildcard characters: False
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
See Add-Sample to add elements such as functions (private or public), tests, DSC Resources to your project.
- Add-Sample
- Convert-SamplerHashtableToString
- Get-BuildVersion
- Get-BuiltModuleVersion
- Get-ClassBasedResourceName
- Get-CodeCoverageThreshold
- Get-MofSchemaName
- Get-OperatingSystemShortName
- Get-PesterOutputFileFileName
- Get-Psm1SchemaName
- Get-SamplerAbsolutePath
- Get-SamplerBuiltModuleBase
- Get-SamplerBuiltModuleManifest
- Get-SamplerCodeCoverageOutputFile
- Get-SamplerCodeCoverageOutputFileEncoding
- Get-SamplerModuleInfo
- Get-SamplerModuleRootPath
- Get-SamplerProjectName
- Get-SamplerSourcePath
- Invoke-SamplerGit
- Merge-JaCoCoReport
- New-SampleModule
- New-SamplerJaCoCoDocument
- New-SamplerPipeline
- Out-SamplerXml
- Set-SamplerPSModulePath
- Split-ModuleVersion
- Update-JaCoCoStatistic