Thursday, 9 May 2019

How to embed RRULE JS Library in VMWare VRO task

I'm trying to create a custom action in VMWare VRO which uses JS for its scripting logic. I'm trying to embed two libraries into a single code block so I can use them. Unfortunately, VRO doesn't use includes or the concept of libraries per se so it all has to be in the same giant script block.

I'd like to use this RRULE JS library:

https://github.com/conrad-vanl/rrule

Which I can embed in one code block no problem. But it's dependent on the underscore library.

https://github.com/jashkenas/underscore

Which I can't seem to get to embed without throwing the following error:

TypeError: Cannot read property "n" from undefined (unnamed script#2293)

Which I'm guessing has something to do with the way the underscore library is formatted. Here is a gist with my current attempt at embedding both.

https://gist.github.com/rsaturns/aceceabb87fc28879ffdb214425a2a15

If I can get both the RRULE and Underscore libraries to be embedded in the same file I think I will be able to get this working.



from How to embed RRULE JS Library in VMWare VRO task

No comments:

Post a Comment