pencil icon indicating copy to clipboard operation
pencil copied to clipboard

Include JS file in Definition's Script

Open lppedd opened this issue 2 years ago • 1 comments

Developing a new Collection, given the following:

<Shapes>  
  <Script>
      <!-- Include JS file (e.g. from the same directory as this Definition.xml file) -->  
  </Script>
  ... 
</Shapes>  

Is this possible?

lppedd avatar Jul 13 '22 15:07 lppedd

So, this seems to be possible, by exposing the script as a Node module, and then using require You can use collection.relURL to know the base path of the collection.

lppedd avatar Jul 15 '22 10:07 lppedd