Commit 97550163 9755016311a77529e2a2ec945b86e1d7fa53c64b by Nicolas Perriault

added cliplay.(js|coffee) to play around with cli arguments handling

1 parent 14c1f1b9
Subproject commit e46d6689f5cee8d66cd6f2952f8f41d8635f0ea0
Subproject commit d0f987e0cf96a019e27201001ba158dbd7a899be
......
casper = require("casper").create()
dump = require("utils").dump
# removing default options passed by the Python executable
casper.cli.drop "cli"
casper.cli.drop "casper-path"
if casper.cli.args.length is 0 and Object.keys(casper.cli.options).length is 0
casper.echo("Pass some args and options to see how they are handled by CasperJS").exit()
casper.echo "Casper CLI passed args:"
dump casper.cli.args
casper.echo "Casper CLI passed options:"
dump casper.cli.options
casper.exit()
var casper = require("casper").create();
var dump = require("utils").dump;
// removing default options passed by the Python executable
casper.cli.drop("cli");
casper.cli.drop("casper-path");
if (casper.cli.args.length === 0 && Object.keys(casper.cli.options).length === 0) {
casper.echo("Pass some args and options to see how they are handled by CasperJS").exit();
}
casper.echo("Casper CLI passed args:");
dump(casper.cli.args);
casper.echo("Casper CLI passed options:");
dump(casper.cli.options);
casper.exit();
\ No newline at end of file