ExtendScript / extendscriptr

An NPM command line tool to compile modern javascript (es5 & es6) into executable extendscript (es3)
Do What The F*ck You Want To Public License
153 stars 15 forks source link

Executing the outputted script with arguments though command line #52

Open KaivnD opened 5 years ago

KaivnD commented 5 years ago

I usually use global variable call arguments, which is an array can be used for passing arguments to the jsx file when I execute a script from command line, but extendscriptr outputted file can't be used for doing this, when I log this variable I got a function.... Then I came up with a quick solution, that is I put single line at top of outputted file with

var scriptArgs = arguments;

and I can access my command line arguments correctly with scriptArgs. Dose anybody has better solution?

ff6347 commented 5 years ago

Can you provide an example script and command line call?