User configuration file
Closed this issue · 4 comments
blindzero commented
Is your feature request related to a problem? Please describe.
For some features (#21, #8 or #22) it will be good to have a user-space configuration file.
Describe the solution you'd like
- JSON (?) based configuration file for user-based settings, as
Additional context
- Where to store user based if module is system-wide?
- Removing when uninstalling module?
- Init if not existing by template?
M1kep commented
If adding a dependency is an option then I believe PSFrameWork has a good configuration system or one of the other config projects out there
blindzero commented
Plan
- Format: PSD1 as it is more readable as JSON / XML and natively supported (YAML isn't)
https://medium.com/@ssg/powershell-accidentally-created-a-nice-configuration-format-3efde5448090
http://ramblingcookiemonster.github.io/PowerShell-Configuration-Data/ - Scope: supporting a user scope at $Env:LocalAppData
- using a fixed module for config handling,
- PoshCode looks promising
- PSFramework seems to be huge, but many functions (https://psframework.org/documentation/documents/psframework/configuration.html)
- ScriptConfig as an alternative, but then JSON, not PSD1
blindzero commented
realized
- $env:LOCALPPDATA\Connect-MS365\Connect-MS365.Config.psd1
- initialized if not available
- switch to reinitializeconfig
- read config
PSD1 file over XML / json as commentable and better readable
not using any framework as too many drawbacks
blindzero commented
realized in 1.3.0