Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
John McEleney
/
casperjs
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
Commit
38748fb0
...
38748fb03f9c4f338aa3b53fb631dd5214a273bd
authored
2013-10-09 00:34:08 +0200
by
mickaelandrieu
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Improved CLI Api for verbose mode
1 parent
c11a69c5
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
6 additions
and
6 deletions
bin/usage.txt
docs/cli.rst
docs/testing.rst
modules/casper.js
bin/usage.txt
View file @
38748fb
...
...
@@ -5,7 +5,7 @@ Usage: casperjs [options] script.[js|coffee] [script argument [script argument .
Options:
--
direct
Prints log messages to the console
--
verbose
Prints log messages to the console
--log-level Sets logging level
--help Prints this help
--version Prints out CasperJS version
...
...
docs/cli.rst
View file @
38748fb
...
...
@@ -91,7 +91,7 @@ Execution results:
The `casperjs` command has three available options:
- ``--
direct
``: to prints out log messages to the console
- ``--
verbose
``: to prints out log messages to the console
- ``--log-level=[debug|info|warning|error]`` to set the :ref:`logging level <logging>`
- ``--engine=[phantomjs|slimerjs]`` to select the browser engine you want to use. CasperJS
supports PhantomJS (default) that runs Webkit, and SlimerJS that runs Gecko.
...
...
@@ -100,7 +100,7 @@ Example:
.. code-block:: text
$ casperjs --
direct
--log-level=debug myscript.js
$ casperjs --
verbose
--log-level=debug myscript.js
Last but not least, you can still use all PhantomJS standard CLI options as you would do with any other phantomjs script:
...
...
docs/testing.rst
View file @
38748fb
...
...
@@ -157,7 +157,7 @@ Options
Options are prefixed with a double-dash (``--``):
- ``--xunit=<filename>`` will export test suite results in a :ref:`XUnit XML file <xunit_report>`
- ``--
direct
`` will print :doc:`log messages <logging>` directly to the console
- ``--
verbose
`` will print :doc:`log messages <logging>` directly to the console
- ``--log-level=<logLevel>`` sets the logging level (see the :doc:`related section <logging>`)
.. versionadded:: 1.0
...
...
@@ -176,7 +176,7 @@ Sample custom command:
$ casperjs test --includes=foo.js,bar.js \
--pre=pre-test.js \
--post=post-test.js \
--
direct
\
--
verbose
\
--log-level=debug \
--fail-fast \
test1.js test2.js /path/to/some/test/dir
...
...
modules/casper.js
View file @
38748fb
...
...
@@ -129,7 +129,7 @@ var Casper = function Casper(options) {
// factories
this
.
cli
=
phantom
.
casperArgs
;
this
.
options
.
logLevel
=
this
.
cli
.
get
(
'log-level'
,
this
.
options
.
logLevel
);
this
.
options
.
verbose
=
this
.
cli
.
get
(
'direct'
,
this
.
options
.
verbose
);
this
.
options
.
verbose
=
this
.
cli
.
has
(
'verbose'
);
this
.
colorizer
=
this
.
getColorizer
();
this
.
mouse
=
mouse
.
create
(
this
);
this
.
popups
=
pagestack
.
create
();
...
...
Please
register
or
sign in
to post a comment