Commit 8bcf51c9 authored by Guillaume Porte's avatar Guillaume Porte 😶
Browse files

ajout d'une variable qui vérifie si le plugin appelé est dans un dossier "/custom"

parent b3ddae4e
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -129,8 +129,12 @@ as element(script)*
    let $pluginsFolder := file:parent(file:parent(static-base-uri())) || $max.cons:PLUGIN_FOLDER_NAME
    let $pluginsJS :=
        for $plugin in max.config:getEnabledPluginNames($projectId)
            for $file in file:list($pluginsFolder || "/" || $plugin, true(), $plugin||".js")
            let $publicjs := max.util:getRelativeRootPath($projectId) || "plugins/" || $plugin || '/' ||
            let $folder := 
                if(file:exists($pluginsFolder || "/custom/" || $plugin))
                then("/custom/")
                else("/")
            for $file in file:list($pluginsFolder || $folder || $plugin, true(), $plugin||".js")
            let $publicjs := max.config:getBaseURI() || "plugins" || $folder || $plugin || '/' ||
            substring-before($file, ".") || ".js"
            return
                <script  type="module"