I am in a situation where I got an angular project. Lets call it project A. Project A is finished and it has a lot of useful components like own material components (Own select, own checkbox... etc...). I need to create project B this time but in the future perhaps project C, D, E .. is coming. I want to share the materials with them without publication. So I created materials module in project A. This module declares and exports the material components. In the (new) project B I import materials module relatively. Obviously because I want to use his components. Unfortunately style of material components is written in scss.
I use variables in the project as well. Why not? when this is one of the strongest feature of scss. So I created a global file that includes scss variables functions mixins and more. I import it like this:
@import "~scss/_global.scss";
.material-componenet{
color: $variableFromGlobal;
}
project A is still working fine. On the other hand when I build project B it does not find "~scss/_global.scss" file because it is looking for it in project B. I want to avoid code duplication. (A B C D E .. can be far from each other in tree structure)
I know it is a special problem but any idea would be helpful.
Thanks your time and answers!