Skip to content

Commit

Permalink
compiler: compile js when .props are in the pod
Browse files Browse the repository at this point in the history
Ensure that the JS compiler runs when a pod does not have @js types
but there are .props file present. This ensure that localized props
and other configuration props are written to the pod.
  • Loading branch information
Matthew Giannini authored and Matthew Giannini committed Mar 18, 2024
1 parent 33465b5 commit 576ea0d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/compiler/fan/steps/CompileJs.fan
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,9 @@ class CompileJs : CompilerStep
// are we forcing generation of js for all types
if (compiler.input.forceJs) return true

// are there any props files that need to be written to JS?
if (compiler.resFiles?.any |file| { file.ext == "props" } ?: false) return true

// run JS compiler if any type has @Js facet
return compiler.types.any { it.hasFacet("sys::Js") }
}
Expand Down

0 comments on commit 576ea0d

Please sign in to comment.