Plaster

Another indispensable tool in your tool belt is Plaster. Plaster offers great support when working with a CI/CD or release pipeline, by providing the scaffolding for your module, your DSC configuration, and whatever else can be templated. Using Plaster is not limited to PowerShell modules—anything that requires some form of scaffolding in the file system and some template files to be written can make use of Plaster.

If you have installed the PowerShell extension for VSCode, Plaster and PSScriptAnalyzer are already tightly integrated into the IDE. To try this, simply hit Ctrl + Shift + P (macOS: Command key + P ) and enter Plaster:

Plaster then displays the default templates that are currently registered. In a couple of steps, how you can easily add your own templates to that list. The manifest module template contained by default is already a good starting point. It creates a manifest module with one Pester unit test script, which validates the module manifest:

After selecting a template, you have the opportunity to enter any mandatory and optional pieces of information required for your module. Usually, templates can read default values, such as the current username, or provide defaults, such as a version number, to quickly invoke a template:

Selecting Visual Studio Code as the editor will directly open the new module so that it can be edited. This is also easily customizable. After all of the parameters have been filled, Plaster generates the scaffolding based on anything configured in the selected template:

A template consists of an XML file, which may or may not be accompanied by file templates. Plaster simply parses the XML and generates your desired folder structure in the given root folder, copies template files and modifies their contents, or simply creates new files.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.137.178.133