|
1 | | -# Purpose |
| 1 | +# PSModuleDevelopment |
2 | 2 |
|
3 | | -The PSModuleDevelopment module is designed to provide tools that help with - big surprise incoming - module development. |
4 | | -This attempts to help with: |
5 | | - - Speeding up iterative procedures, especially reinitiating tests runs |
6 | | - - Debugging Execution |
7 | | - - Development Research & Analytics |
8 | | - - Miscellaneous other things |
| 3 | +Welcome to your one stop for PowerShell development tools! |
| 4 | +This project is designed to help you with accelerating your coding workflows through a wide range of utilities. |
| 5 | +Its flagship feature is a *templating engine* that allows you to swiftly create new projects - either by using some of the default templates or easily creating your own. |
9 | 6 |
|
10 | | -# Alias Warning |
| 7 | +## Online Documentation |
11 | 8 |
|
12 | | -This module actually ships with convenience aliases. |
| 9 | +As this module is part of the PSFramework project, its documentation can be found on [PSFramework.org](https://psframework.org/documentation/documents/psmoduledevelopment/templates.html). |
13 | 10 |
|
14 | | -Generally, modules should leave aliases like that to the user's preference. |
15 | | -However, in this instance, the main purpose is to optimize the performance of the developer, which requires the use of aliases. |
| 11 | +> As ever, documentation takes time out of _"more features!"_, so there could be more, but at least the templating is covered in depth. |
16 | 12 |
|
17 | | -Due to this, the decision was made to ship the module with aliases. |
| 13 | +## Install |
18 | 14 |
|
19 | | -# Configuration Notice |
| 15 | +To get read to use this module, run this: |
20 | 16 |
|
21 | | -This module uses the PSFramework for configuration management (and many other things). |
22 | | -Run `Get-PSFConfig -Module PSModuleDevelopment` in order to retrieve the full list of configurations set. |
| 17 | +```powershell |
| 18 | +Install-Module PSModuleDevelopment -Scope CurrentUser |
| 19 | +``` |
23 | 20 |
|
24 | | -# Profile notice |
| 21 | +## Profit |
25 | 22 |
|
26 | | -Some features of this module assume, that it is in the profile and automtically imported on console start. |
27 | | -It is still possible to profit from the module without this, but it is highly recommended to add the module import to the PowerShell profile |
| 23 | +With that you are ready to go and have fun with it. |
| 24 | +A few examples of what it can do for you: |
| 25 | + |
| 26 | +> Create a new module project |
| 27 | +
|
| 28 | +```powershell |
| 29 | +Invoke-PSMDTemplate MiniModule |
| 30 | +``` |
| 31 | + |
| 32 | +> Parse a script file and export all functions into dedicated files |
| 33 | +
|
| 34 | +```powershell |
| 35 | +Split-PSMDScriptFile -File .\largescript.ps1 -Path .\functions |
| 36 | +``` |
| 37 | + |
| 38 | +> Fix all the file encodings |
| 39 | +
|
| 40 | +```powershell |
| 41 | +Get-ChildItem -Recurse -File | Set-PSMDEncoding |
| 42 | +``` |
| 43 | + |
| 44 | +> Fix parameter blocks |
| 45 | +
|
| 46 | +```powershell |
| 47 | +Get-ChildItem -Recurse -File | Set-PSMDCmdletBinding |
| 48 | +``` |
| 49 | + |
| 50 | +> Get better members |
| 51 | +
|
| 52 | +```powershell |
| 53 | +Get-Date | Get-PSMDMember -Name ToString |
| 54 | +``` |
| 55 | + |
| 56 | +> Search for Assemblies and Types |
| 57 | +
|
| 58 | +```powershell |
| 59 | +# List all assemblies |
| 60 | +Get-PSMDAssembly |
| 61 | +
|
| 62 | +# Search for types in that assembly |
| 63 | +Get-PSMDAssembly *ActiveDirectory* | Find-PSMDType |
| 64 | +
|
| 65 | +# Search for all types implementing IEnumerable |
| 66 | +Find-PSMDType -Implements IEnumerable |
| 67 | +
|
| 68 | +# Get Constructors |
| 69 | +[DateTime] | Get-PSMDConstructor |
| 70 | +``` |
0 commit comments