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
9b5f9255
...
9b5f925578edf0eae52c5f7acc658bc52e0ffc3e
authored
2013-10-08 19:12:35 -0700
by
Matt DuVall
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
Merge pull request #664 from mickaelandrieu/master
Improved CLI Api for verbose mode
2 parents
3cb87be4
38748fb0
Hide 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 @
9b5f925
...
...
@@ -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 @
9b5f925
...
...
@@ -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 @
9b5f925
...
...
@@ -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 @
9b5f925
...
...
@@ -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