Generating data for Javascript

js.Build has an options parameter where you can pass a params dict.
you can create the params dict with whatever template code you want and then pass it to the js.Build.

Execute as Template means you could mix up your js code with template methods and create a new javascript file where the template code is evaluated.

both ways you would embed the options to the javascript at build time without a client side request to a separate config file.

following related topics i found that one as another option embedding tha json into the html: Loading json files from a javascript program