evolus / pencil

The Pencil Project's unique mission is to build a free and opensource tool for making diagrams and GUI prototyping that everyone can use.

Home Page:http://pencil.evolus.vn

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Include JS file in Definition's Script

lppedd opened this issue · 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?

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.