Hello,
I really like concept of paths relative to tox files and I am trying to figure out how to migrate my components to this new workflow. However I have a hard time figuring it out for more complex (nested) scenarios.
I am attaching simple example with multiple components in following file structure. There are two fonts, one is part of a main
component, the other is part of a child1
. All components use tox-relative paths. What I am trying to do is to use both fonts in child2
, but I donβt want to use ββ¦/β to jump up (since this can get unreadable when jumping up multiple levels). Instead I am trying to point to some component and define relative path based on it.
βββ main
β βββ child1
β β βββ child1.tox
β β βββ child2
β β β βββ child2.tox
β β βββ font
β β βββ Sevillana-Regular.ttf
β βββ font
β β βββ NotoMono-Regular.ttf
β βββ main.tox
βββ test.4.toe
Real example: nested_test.zip (148.5 KB)
In the past I have usually used expressions like this to find proper file:
tdu.expandPath(parent.Child1.par.externaltox + '/..') + '/font/Sevillana-Regular.ttf'
This concept however doesnβt play well with paths that are relative to tox files, as they are incorrectly expanded (as if they were relative to toe file). Therefore I am looking for some alternative solution. Please is there some way to correctly expand these paths? Thanks.
Also I am hitting one more problem, that is very much expected with tox-relative paths, but is something I am trying to figure out too⦠Lets say I would like to make main
component from previous example deployable in a single tox file (something like main_release.tox). As soon as I do that, I break all paths to external fonts / assets / configs etc. - as they all use relative paths throughout the code and parameters of nested components. Please what do you think might be a good approach for handling such situation? I have originally thought it might just work if I turn βEnable External .toxβ off, but keep the βExternal .tox Pathβ present - so that relative paths would still be working, just the tox will become βembeddedβ, but this doesnβt seem to be the case.
I would generally like to keep the structure untouched even for the release, but when I need to enable component privacy, this concept quickly breaks due to various reasons and I am kinda forced into deployment of βflatβ private component (with all sub-components embedded within it). Thanks once again.