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
50ab02e1
...
50ab02e1fca1779f71980b7c58df1877a4b3aaa2
authored
2014-07-31 00:05:46 +0200
by
Adam
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Version check extended to support phantomjs v2.x
1 parent
b62c37d9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
8 deletions
bin/bootstrap.js
bin/bootstrap.js
View file @
50ab02e
...
...
@@ -101,15 +101,17 @@ CasperError.prototype = Object.getPrototypeOf(new Error());
phantom
.
exit
();
}
(
function
(
version
)
{
(
function
(
version
)
{
// required version check
if
(
version
.
major
!==
1
)
{
return
__die
(
'CasperJS needs PhantomJS v1.x'
);
}
if
(
version
.
minor
<
8
)
{
return
__die
(
'CasperJS needs at least PhantomJS v1.8 or later.'
);
}
if
(
version
.
minor
===
8
&&
version
.
patch
<
1
)
{
return
__die
(
'CasperJS needs at least PhantomJS v1.8.1 or later.'
);
if
(
version
.
major
===
1
)
{
if
(
version
.
minor
<
8
)
{
return
__die
(
'CasperJS needs at least PhantomJS v1.8 or later.'
);
}
if
(
version
.
minor
===
8
&&
version
.
patch
<
1
)
{
return
__die
(
'CasperJS needs at least PhantomJS v1.8.1 or later.'
);
}
}
else
if
(
version
.
major
!==
2
)
{
return
__die
(
'CasperJS needs PhantomJS v1.x or v2.x'
);
}
})(
phantom
.
version
);
...
...
Please
register
or
sign in
to post a comment