-
Notifications
You must be signed in to change notification settings - Fork 126
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Include/Import local file dependency #34
Comments
Nice idea, and it seems easy to do. But how do you write those scripts? Since the IDE won't resolve //INCLUDE you'll get tons of red code, don't you? |
I've implemented it in a separate branch for now. See https://github.com/holgerbrandl/kscript/blob/include_directive/test/resources/includes/include_variations.kts for an example. Feel welcome to let me know what you think. |
That seems perfect for what I want ! |
I'm still skeptical if it makes sense to include it into the release branch because of missing IDE support. All the included bits will light up in bright red in the master script. How would you code them efficiently without pain? |
Was anything ever decided as to how to add IDE support for |
In general, the feature has been added, see https://github.com/holgerbrandl/kscript#ease-prototyping-with-include. Except for IDE support, which would require a separate plugin. However, its fairly easy to configure the IDE accordingly in my experience. |
In a project, I have multiple kotlin script files, and I have some methods I need to use in most, if not all script.
Is there an existing way to write these method in a single external file, and include it from the other scripts ?
eg :
utils.kts
myscript.kts
The text was updated successfully, but these errors were encountered: