Skip to content

Commit

Permalink
Merge pull request #52 from InkApplications/script-updates
Browse files Browse the repository at this point in the history
Update script config
  • Loading branch information
ReneeVandervelde authored Oct 6, 2024
2 parents 26f522e + 61e25dc commit c473239
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import kotlin.script.experimental.api.*
import kotlin.script.experimental.host.toScriptSource
import kotlin.script.experimental.jvmhost.BasicJvmScriptingHost
import kotlin.script.experimental.jvmhost.createJvmCompilationConfigurationFromTemplate
import kotlin.script.experimental.jvmhost.createJvmEvaluationConfigurationFromTemplate

@KotlinScript(
fileExtension = "inkui.kts",
Expand Down Expand Up @@ -121,7 +122,7 @@ abstract class InkUiScript(
val compilationConfiguration = createJvmCompilationConfigurationFromTemplate<InkUiScript> {
defaultImports(*customImports)
}
val evaluationConfiguration = ScriptEvaluationConfiguration {
val evaluationConfiguration = createJvmEvaluationConfigurationFromTemplate<InkUiScript> {
constructorArgs(scriptFile, customRenderers, customImports)
}
return BasicJvmScriptingHost().eval(
Expand All @@ -140,7 +141,7 @@ abstract class InkUiScript(
val compilationConfiguration = createJvmCompilationConfigurationFromTemplate<PartialScript> {
defaultImports(*customImports)
}
val evaluationConfiguration = ScriptEvaluationConfiguration {
val evaluationConfiguration = createJvmEvaluationConfigurationFromTemplate<PartialScript> {
constructorArgs(parent)
}
return BasicJvmScriptingHost().eval(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package ink.ui.render.statichtml
import kotlin.script.experimental.annotations.KotlinScript

@KotlinScript(
fileExtension = "inkui.kts",
fileExtension = "inkui.part.kts",
compilationConfiguration = InkUiConfig::class
)
abstract class PartialScript(
Expand Down

0 comments on commit c473239

Please sign in to comment.