I am running a separate node server as described in this tutorial to create a plugin with generator-core. http://tomkrcha.com/?p=3896
I am in a situation where I need to send a lot of JS to photoshop via generator.evaluateJSXString(). But this can get out of hand easily as you can only send a string. So for any complicated functionality it becomes difficult to maintain. Is it possible define a bunch of functions in a extend script file and then call those functions from the node app?
So i could send:
generator.evaluateJSXString('doSomeStuff()');
And in a script somewhere (I don't know where this script should go)
I have that function defined which can do some stuff
function doSomeStuff(){
for(var i = 0; i < 10; i++){
doc.artLayers.add();
}
}
Where would the Extend Script File go in this instance? OR is there a better way to achieve this sort of thing.