File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ extendscriptr
1212 . option ( '-s, --script <path>' , 'The input file to compile into an executable extendscript' )
1313 . option ( '-o, --output <path>' , 'The path to the wished compiled output file' )
1414 . option ( '-t, --target [targetApp]' , 'The Adobe Application the script is intended for. i.e. InDesign [targetApp]' )
15+ . option ( '-e, --targetengine [targetEngine]' , 'The target engine. i.e. "session" [targetEngine]' )
1516 . parse ( process . argv ) ;
1617
1718console . log ( 'Running extendscriptr with following options:' ) ;
@@ -38,6 +39,14 @@ if( adobeTarget &&
3839 browserifyPlugins . push ( [ prependify , '#target ' + extendscriptr . target + '\n' ] ) ;
3940} ;
4041
42+ var targetEngine = String ( extendscriptr . targetengine ) . replace ( new RegExp ( '^[^a-zA-Z_$]|[^0-9a-zA-Z_$]' , 'g' ) , '_' ) ;
43+
44+ if ( targetEngine !== 'undefined' ) {
45+ if ( targetEngine . length > 0 ) {
46+ browserifyPlugins . push ( [ prependify , '#targetengine "' + targetEngine + '"\n' ] ) ;
47+ }
48+ }
49+
4150var b = browserify ( {
4251 entries : [ extendscriptr . script ] ,
4352 transform : [ [ require . resolve ( 'babelify' ) , {
You can’t perform that action at this time.
0 commit comments