I have not used Toit for a couple of months and now seem unable to find how to pass assets to jag on the command line. Is it -D or --assets and what is the format. I cannot find it in the documentation(edited)
RobvanLopik09/05/2024 04:22 PM
I mean without using an assets file
RobvanLopik09/05/2024 05:04 PM
OK, found it in my own notes! But where do I find it in the docs?
OPRobvanLopik
OK, found it in my own notes! But where do I find it in the docs?
floitsch09/06/2024 10:10 AM
We should probably add something to the toitlang/jaguar README. Could you share with me what you had in your notes?
RobvanLopik09/07/2024 09:33 AM
I suppose I copied an example I had seen. Basically I used -D key=value and retrieve the result in my program with
RobvanLopik09/07/2024 09:34 AM
defines := assets.decode.get "jag.defines"
--if_present=: tison.decode it
--if_absent=: {:}
if defines is not Map:
print "defines are malformed"
defines.get "key"
--if_present=: Broker = it(edited)
RobvanLopik09/07/2024 09:34 AM
I used it to get the address of an MQTT broker
RobvanLopik09/07/2024 09:38 AM
Sorry the indentation shows up wrong
floitsch09/08/2024 07:37 AM
Thanks. I will add more information to the readme and other places.