Stephanevg / PSHTML

Cross platform Powershell module to generate HTML markup language
https://pshtml.readthedocs.io/en/latest/
Other
165 stars 43 forks source link

Includes and Assets redesign #240

Closed Stephanevg closed 5 years ago

Stephanevg commented 5 years ago

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:

  1. 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.

  2. 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)

Stephanevg commented 5 years ago

First version added to framework in commit : https://github.com/Stephanevg/PSHTML/commit/6ddfa0e6adb432961ddba2fa2c16f4645dd482b7

Need to add pester tests