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
8772328e
...
8772328ef2ce27b1dff808f19507d0b03be3a14b
authored
2013-02-21 22:42:42 +0100
by
Nicolas Perriault
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
closes #392 - casperjs exec gets --direct & --log-level options
1 parent
8b891188
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
11 additions
and
8 deletions
CHANGELOG.md
bin/usage.txt
modules/casper.js
tests/run.js
CHANGELOG.md
View file @
8772328
...
...
@@ -64,7 +64,7 @@ Last, all the casper test suites have been upgraded to use the new testing featu
### Bugfixes & enhancements
None yet.
-
closed
[
#392
](
https://github.com/n1k0/casperjs/issues/392
)
-
`--direct`
&
`--log-level`
options available for the
`casperjs`
executable
2013-02-08, v1.0.2
------------------
...
...
bin/usage.txt
View file @
8772328
...
...
@@ -5,7 +5,9 @@ Usage: casperjs [options] script.[js|coffee] [script argument [script argument .
Options:
--direct Prints log messages to the console
--log-level Sets logging level
--help Prints this help
--version Prints out CasperJS version
Read the docs http://casperjs.org/
Read the docs http://
docs.
casperjs.org/
...
...
modules/casper.js
View file @
8772328
...
...
@@ -122,10 +122,15 @@ var Casper = function Casper(options) {
};
// options
this
.
options
=
utils
.
mergeObjects
(
this
.
defaults
,
options
);
// properties
this
.
checker
=
null
;
// 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
.
colorizer
=
this
.
getColorizer
();
this
.
mouse
=
mouse
.
create
(
this
);
this
.
popups
=
pagestack
.
create
();
// properties
this
.
checker
=
null
;
this
.
currentResponse
=
undefined
;
this
.
currentUrl
=
'about:blank'
;
this
.
currentHTTPStatus
=
null
;
...
...
@@ -140,10 +145,8 @@ var Casper = function Casper(options) {
warning
:
'COMMENT'
,
error
:
'ERROR'
};
this
.
mouse
=
mouse
.
create
(
this
);
this
.
page
=
null
;
this
.
pendingWait
=
false
;
this
.
popups
=
pagestack
.
create
();
this
.
requestUrl
=
'about:blank'
;
this
.
resources
=
[];
this
.
result
=
{
...
...
tests/run.js
View file @
8772328
...
...
@@ -53,8 +53,6 @@ function checkIncludeFile(include) {
function
checkArgs
()
{
"use strict"
;
// parse some options from cli
casper
.
options
.
verbose
=
casper
.
cli
.
get
(
'direct'
)
||
false
;
casper
.
options
.
logLevel
=
casper
.
cli
.
get
(
'log-level'
)
||
"error"
;
if
(
casper
.
cli
.
get
(
'no-colors'
)
===
true
)
{
var
cls
=
'Dummy'
;
casper
.
options
.
colorizerType
=
cls
;
...
...
Please
register
or
sign in
to post a comment