multiple 'src/lib' directories #256
Replies: 2 comments 1 reply
-
Well. Right now, the source directory for library function is a single directory. There is no support for multiple "load paths". Also note that you can specify a different location for that directory in the But I suspect none of these answer your question directly - I was mainly ensuring we are on the same page. As I understand, you wish to add another load path for libraries that is external to the directory of the specific bashly project, so that you can use the same lib directory for more than one bashly projects. Correct? If so, then:
# In the aws project
src/lib/aws # real directory
src/lib/common # symlink to /wherever/functions/bashly-common
# In the azure project
src/lib/azure # real directory
src/lib/common # symlink to /wherever/functions/bashly-common
Not tested, but should work - although I agree, not ideal. |
Beta Was this translation helpful? Give feedback.
-
I was thinking of the symlink approach too, I will go with that for now. Thanks for your quick reply! |
Beta Was this translation helpful? Give feedback.
-
The
bashly add lib
functionality is incredibly useful because it prevents code duplication. It would be really nice if we could specify multiple such directories, pulling in all the functions and code defined in them into the final script. In this manner, there could be separate Bashly scripts selecting different combinations of lib directories. For instance, there could be the following three directories:Two bashly scripts could be configured as follows:
Is there a way to achieve this in another way?
Beta Was this translation helpful? Give feedback.
All reactions