phantomjs/examples/arguments.coffee

8 lines
197 B
CoffeeScript
Raw Normal View History

system = require 'system'
if system.args.length is 1
2011-05-29 16:21:25 +04:00
console.log 'Try to pass some args when invoking this script!'
else
for arg, i in system.args
2011-05-29 16:21:25 +04:00
console.log i + ': ' + arg
phantom.exit()