devblackops / building-powershell-modules-feedback

Feedback on the PowerShell Module Development book
6 stars 1 forks source link

Grammatical error: #4

Closed jbirley closed 4 years ago

jbirley commented 4 years ago

Section: 1.3 Terminology States: We’re going to be using a few different terms related to modules, so let’s go over them quickly before we get into too deep. Recommendation: We’re going to be using a few different terms related to modules, so let’s go over them quickly before we get in too deep.

Section: 2.1.1 $env:PSModulePath States: How PowerShell uses the $env:PSModulePath variable to find modules is much the same as operating systems as the standard PATH environment variable to find executables. Recommendation: How PowerShell uses the $env:PSModulePath variable to find modules is much the same as operating systems that use the standard PATH environment variable to find executables.

Section: 2.4.2 Manual installation States: Next, we’ll create a sub-folder for the module. The folder name must by the same name as our psm1 file in order PowerShell to find the module. Recommendation: Next, we’ll create a sub-folder for the module. The folder name must be the same name as our psm1 file in order for PowerShell to find the module.

Section: 2.4.2 Manual installation States: And now we should be able to un the Get-HelloWorld command that was in our module: Recommendation: And now we should be able to run the Get-HelloWorld command that was in our module:

Section: 2.6.1 Modules are single-instance States: Multiple versions loaded on one time can lead to unpredictable behavior, so the practice is discouraged. Recommendation: Multiple versions loaded at one time can lead to unpredictable behavior, so the practice is discouraged.

Section: 3.2 Creating a script module States: You may be itching to get started and create some modules, so let’s go ahead and make a basic one we can demonstrate some concepts. Recommendation: You may be itching to get started and create some modules, so let’s go ahead and make a basic one so we can demonstrate some concepts.

Section: 3.2.1 Creating a basic script States: Get-MyPlublicIP.ps1 script Recommendation: Get-MyPublicIP.ps1 script

Section: 3.2.1 Creating a basic script States: Since this is such a handy command, we want to make it a reusable component that could be from many places. Recommendation: Since this is such a handy command, we want to make it a reusable component that could be used in many places.

Section: 3.3.2 Creating a module manifest ("An evolving manifest" callout) States: The auto-loading algorithm had perform extra work processing the module to determine what functions or cmdlets to export. Recommendation: The auto-loading algorithm had to perform extra work processing the module to determine what functions or cmdlets to export.

Section: 3.3.3.1 Identity properties States: Identity properties, unsurprisingly, deal with the modules’ identity in some way. The only properties of consequence that affect working with the module such as importing or installing are ModuleVersion and GUID. Recommendation: Identity properties, unsurprisingly, deal with a module's identity in some way. The only properties of consequence that affect working with the module, such as importing or installing, are ModuleVersion and GUID.

Section: 3.3.3.3 Content properties States: RootModule string Script or binary module file load associated with the manifest. Recommendation: RootModule string Script or binary module file associated with the manifest.

Section: 3.3.3.3 Content properties States: DefaultCommandPrefix string Default prefix for command that are exported from this module. Recommendation: DefaultCommandPrefix string Default prefix for commands that are exported from this module.

Section: 3.3.3.3 Content properties States: This property is useful if you need to prepare the environment to perform additional logic, execute “pre-flight” checks, and this of that nature. Recommendation: This property is useful if you need to prepare the environment to perform additional logic, execute “pre-flight” checks, and things of that nature.

Section: 3.3.3 Elements of a manifest (just after "Manifest Gotchas") States: Now that we’ve covered the various manifest properties and their intended usage let’s talk about how to update the manifest as a module evolves. Recommendation: Now that we’ve covered the various manifest properties and their intended usage, let’s talk about how to update the manifest as a module evolves.

Section: 3.3.4 Updating a manifest States: Fortunately, these command parameters are a one-for-one mapping to the module manifest properties, and makes the command simple reason to about. Recommendation: Not sure what "simple reason to about." means?

Section: 3.4 Summary (Key Points callout) States: Manifests can be tested with Test-ModuleManifest, but don’t rely solely on this method as it as gaps in test functionally. Recommendation: Manifests can be tested with Test-ModuleManifest, but don’t rely solely on this method as it has gaps in test functionally.

Section: 4.1.1 Implicit dependencies States: We can not guarantee the environment our code run on will meet our requirements if we are only assuming the dependencies are there Recommendation: We can not guarantee the environment our code runs on will meet our requirements if we are only assuming the dependencies are there

Section: 4.1.3 Focusing our efforts States: Quality PowerShell modules are written this to behave similarly to native PowerShell commands. Recommendation: Quality PowerShell modules are written this way to behave similarly to native PowerShell commands.

Section: 4.1.5 Installing dependencies States: The canonical ID is used by the PowerShellGet module actually to download these dependencies when it needs to. Recommendation: The canonical ID is used by the PowerShellGet module to actually download these dependencies when it needs to.

devblackops commented 4 years ago

Nice catches @jbirley. Thanks!