KevinMarquette / PlasterTemplates

A set of Plaster templates that I use.
MIT License
37 stars 9 forks source link

convert to a template for the manifest #23

Closed KevinMarquette closed 6 years ago

KevinMarquette commented 6 years ago

The manifest is now generated from a template. I slimmed it down and changed the default exports to @(). This also resolves an issue with a PSScriptAnalyser rule that would fail a new module.

I also removed the version prompt and just defaulted it to 0.1.0

ccrowhurstram commented 6 years ago

FunctionsToExport: '*' is still a useful default as it means you don't have to check in changes to the Manifest file whenever a new public function is added.

Or am I missing something?

KevinMarquette commented 6 years ago

The reason why script analyzer was flagging that is because it's a best practice not to use the wildcard. By using a * for any one of those properties, PowerShell has to process the whole psm1 file to figure out what it exports. This is fine when you are importing the module, but starting with PS 5.0 they stopped trying to perform autoloading discovery for modules that use the *.

I felt it was better to default it to @() to encourage that best practice and allow the user to make a conscious decision to use the *

christianacca commented 6 years ago

But the deployed version of of the module will have an explicit list of functions, so the * is just during development so not a problem in my opinion.

KevinMarquette commented 6 years ago

That is a fair point that I didn't consider.

On Jan 13, 2018 6:17 AM, "Christian Crowhurst" notifications@github.com wrote:

But the deployed version of of the module will have an explicit list of functions, so the * is just during development so not a problem in my opinion.

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/KevinMarquette/PlasterTemplates/pull/23#issuecomment-357438770, or mute the thread https://github.com/notifications/unsubscribe-auth/AHgBLXSSXf5m-qrrvOkfj6iuAb3cuarMks5tKLrmgaJpZM4Rb643 .