devModulesDirMonitor.psd1
@{ ModuleVersion = '0.0.2.0' RootModule = 'devModulesDirMonitor' Author = 'Dmitry Molchanov' GUID = 'd66d2705-0944-420b-8d02-17c535b7c0c5' CompanyName = 'home' Copyright = '(c) 2019 DMhome. All rights reserved.' Description = 'Provides functions (cmdlets) to monitor changes in modules in developer folder. Updated module will be updated via command Import-Module $modName -Force. How to use. Add the following code in your project entry point file. function monitorChangesInModules($dir) { startDirMonitor $dir if ($updatedModules) { foreach ($modName in $updatedModules) { Import-Module "$modName" -Force } resetChangedModulesList } } $dirToWatch = ".\myModules" monitorChangesInModules($dirToWatch)' } |