Skip to content

Configuration should be JSON based in a $config object #25

@EdLichtman

Description

@EdLichtman

Instead of what I'm doing which is declaring the Configuration Settings in the Private Functions Help file, I should Generate the Configuration Settings in the Importing psm1 file. First I'll see if the Config file exists, and if it doesn't I'll create it. Then I'll Convert from JSON into an object, set the values and convert back to JSON.

The benefit of this is configuration will become Scalable. I'd like to make a variable "AutoLoadingPreference" to change whether the QuickModuleCLI AutoLoads, since I shouldn't dictate what other people's environments look like. If AutoLoadingPreference is set to None, then No functions get AutoLoaded. If AutoLoadingPreference is set to Nested, then there should also be a "AutoLoadingNestedModules" Array of Module Names that automatically gets added to when a new module is created. If AutoLoadingPreference is set to Module, then Only Module Functions are autoloaded. and if AutoLoading preference is set to All, then all Modules, Nested Modules will be autoloaded.

Then I'd have a
Set-AutoLoadingPreference command -AutoLoadingPreference -Modules

And I can look at dynamically generating the Values that can be stuck into the Modules.

This would open up to much more configuration changes too.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions