nl_tokens: The worker task that launches phantomjs .
pl_tokens: function worker ( input , options , notifier , qcb ) { var cp , customModule , snapshotScript = options . snapshotScript , phantomjsOptions = Array . isArray ( input . phantomjsOptions ) ? input . phantomjsOptions : [ input . phantomjsOptions ] ; // If the outputFile has NOT already been seen by the notifier, process. if ( ! notifier . known ( input . outputFile ) ) { // map snapshotScript object script to a real path if ( _ . isObject ( options . snapshotScript ) ) { snapshotScript = path . join ( __dirname , phantomDir , options . snapshotScript . script ) + ".js" ; customModule = options . snapshotScript . module ; } cp = spawn ( options . phantomjs , phantomjsOptions . concat ( [ snapshotScript , input . outputFile , input . url , input . selector , input . timeout , input . checkInterval , input . useJQuery , input . verbose , customModule ] ) , { cwd : process . cwd ( ) , stdio : "inherit" , detached : true } ) ; cp . on ( "error" , function ( e ) { notifier . remove ( input . outputFile ) ; notifier . setError ( e ) ; console . error ( e ) ; qcb ( e ) ; } ) ; cp . on ( "exit" , function ( code ) { qcb ( <mask> ) ; } ) ; // start counting notifier . add ( input . outputFile , input . timeout ) ; } else { // The input.outputFile is being or has been processed this run. qcb ( 0 ) ; } }