runegan / jsxbin

Convert jsx ExtendScript files into jsxbin files using ExtendScript Toolkit
MIT License
87 stars 21 forks source link

Fix "#include" preprocessor issue. #5

Closed rendertom closed 7 years ago

rendertom commented 7 years ago

From ESTK's hidden file 80document.jsx you can see that app.compile() takes 3 arguments. s = app.compile( this.getText(), ( f ? f.absoluteURI : undefined ), this.includePath );

Not sure what second argument is for, but third argument sets the includePath of the current script which resolves the relative import.

So in generateScriptFile.js file you could use this: var t = app.compile(s, undefined, fileIn.parent.absoluteURI);

Boom!