I was looking into this one tonight.
It seems like the change is a bit less straightforward than expected, if we want to avoid a breaking change.
Includes are created in the 'ConfigurationDocument' class, on the load of the module. Originally, they are planned to be located in the location of the module.
Ideally, I want to do the following things:
The possibility to have an 'Includes' folder on the root level of the module, which would be available to all the projects on the system that loads the PSHTML module.
Make Includes available at the project level as well (In the script folder).
Fallback
When include is called in a script, and no 'Includes' folder is located in the script (project) folder, than the script should go and look into the module includes folder for that specific include file.
Conflict
If there is a Footer.ps1 located in $ModuleRoot\Includes and $ScriptRoot\Includes the file located the closets to the script should be the one presented to the client ($ScriptRoot\Includes)
I was looking into this one tonight. It seems like the change is a bit less straightforward than expected, if we want to avoid a breaking change.
Includes are created in the 'ConfigurationDocument' class, on the load of the module. Originally, they are planned to be located in the location of the module.
Ideally, I want to do the following things:
The possibility to have an 'Includes' folder on the root level of the module, which would be available to all the projects on the system that loads the PSHTML module.
Make Includes available at the project level as well (In the script folder).
Fallback
When include is called in a script, and no 'Includes' folder is located in the script (project) folder, than the script should go and look into the module includes folder for that specific include file.
Conflict
If there is a
Footer.ps1
located in$ModuleRoot\Includes
and$ScriptRoot\Includes
the file located the closets to the script should be the one presented to the client ($ScriptRoot\Includes)