Hi Max,
I recommend you to add a Clock Interface Asset in a blank experience, right-click it, then “Open File location”.
It will open the folder where this IA is stored and you will be able to dig in and see how it includes moment.js library.
As you guessed, the reference is in the Clock.ifd file:
"if.dependencies": [
"EventEmitter.js",
"moment-with-locales.js",
"moment-timezone-with-data.js",
"Clock.js"
],
Then you will be able to use the library in the associated Clock.js file
Don’t forget, as pointed in the related article, when including a library:
Some common Web browser JavaScript properties and methods, implemented by the ‘window’ object - such as ‘location’ - are not available. As a result, your IA must rely on JavaScript code only and will not work with libraries such as JQuery, Dojo and so on.
Also, if you haven’t done it already, I recommend our Video Lesson “Create a Custom Interface Asset Using JavaScript” from the Connecting to the World Course in Intuiface Academy.
Regards,
Alex.