You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We've been careful crafting the importing code to not important beyond the script directory. There are some cases where the user wants to specify additional import directories though: if the script is in a sub-directory but need to access library code from a top-level directory.
We could add -I option to tell the various importers to consider extra directories when looking for modules.
-I added to the common VM object (common, between run and generate)
dlespiau
changed the title
Allow the user to specify addition directories to look for modules to import
Allow the user to specify additional directories to look for modules to import
Aug 15, 2019
We've been careful crafting the importing code to not important beyond the script directory. There are some cases where the user wants to specify additional import directories though: if the script is in a sub-directory but need to access library code from a top-level directory.
We could add
-I
option to tell the various importers to consider extra directories when looking for modules.-I
added to the common VM object (common, betweenrun
andgenerate
)FileImporter
(https://github.com/jkcfg/jk/blob/master/pkg/resolve/file_importer.go). It'd be nice to have a unit-test for that as well infile_importer_test.go
.NpmImporter
(https://github.com/jkcfg/jk/blob/master/pkg/resolve/npm.go). It'd be nice to have a unit-test for that as well innpm_test.go
.The text was updated successfully, but these errors were encountered: