#2926 ES Locale Props

SlimerDude Thu 25 Jul

Hi, on the back of an older SkySpark post I think web::FilePack still needs to be updated to use the new compilerEs version of JsProps.

FilePack.toLocaleJsFile()

** Compile the locale props into a JavaScript file "{locale}.js"
static File toLocaleJsFile(Locale locale, Pod[] pods := Pod.list)
{
  buf := Buf(1024)
  m := Slot.findMethod("compilerJs::JsProps.writeProps")  // <-- Wot no ES?
  path := `locale/${locale.toStr}.props`
  pods.each |pod| { m.call(buf.out, pod, path, 1sec) }
  return buf.toFile(`${locale}.js`)
}

Login or Signup to reply.