preparing for 0.4 release
Showing
2 changed files
with
49 additions
and
1 deletions
... | @@ -30,6 +30,15 @@ | ... | @@ -30,6 +30,15 @@ |
30 | return; | 30 | return; |
31 | } | 31 | } |
32 | 32 | ||
33 | phantom.casperVersion = { | ||
34 | major: 0, | ||
35 | minor: 4, | ||
36 | revision: 0, | ||
37 | toString: function() { | ||
38 | return [this.major, this.minor, this.revision].join('.'); | ||
39 | } | ||
40 | }; | ||
41 | |||
33 | var fs = require('fs'); | 42 | var fs = require('fs'); |
34 | 43 | ||
35 | fs.pathJoin = function() { | 44 | fs.pathJoin = function() { |
... | @@ -87,7 +96,11 @@ | ... | @@ -87,7 +96,11 @@ |
87 | phantom.casperLoaded = true; | 96 | phantom.casperLoaded = true; |
88 | 97 | ||
89 | if (true === phantom.casperArgs.options.cli) { | 98 | if (true === phantom.casperArgs.options.cli) { |
90 | if (phantom.casperArgs.args.length === 0 || !!phantom.casperArgs.options.help) { | 99 | if (!!phantom.casperArgs.options.version) { |
100 | console.log(phantom.casperVersion.toString()); | ||
101 | phantom.exit(0); | ||
102 | } else if (phantom.casperArgs.args.length === 0 || !!phantom.casperArgs.options.help) { | ||
103 | console.log('CasperJS version ' + phantom.casperVersion.toString()); | ||
91 | console.log('Usage: casperjs script.(js|coffee) [options...]'); | 104 | console.log('Usage: casperjs script.(js|coffee) [options...]'); |
92 | console.log('Read the docs http://n1k0.github.com/casperjs/'); | 105 | console.log('Read the docs http://n1k0.github.com/casperjs/'); |
93 | phantom.exit(0); | 106 | phantom.exit(0); | ... | ... |
package.json
0 → 100644
1 | { | ||
2 | "name": "casperjs", | ||
3 | "description": "Navigation scripting & testing utility for PhantomJS", | ||
4 | "version": "0.4", | ||
5 | "keywords": [ | ||
6 | "phantomjs", | ||
7 | "javascript" | ||
8 | ], | ||
9 | "maintainers": [ | ||
10 | { | ||
11 | "name": "Nicolas Perriault", | ||
12 | "email": "nperriault@gmail.com", | ||
13 | "web": "http://www.akei.com" | ||
14 | } | ||
15 | ], | ||
16 | "dependencies": { | ||
17 | "http://www.phantomjs.org/": "1.3" | ||
18 | }, | ||
19 | "bugs": { | ||
20 | "web": "https://github.com/n1k0/casperjs/issues" | ||
21 | }, | ||
22 | "repositories": [ | ||
23 | { | ||
24 | "type": "git", | ||
25 | "url": "git://github.com/n1k0/casperjs.git" | ||
26 | } | ||
27 | ], | ||
28 | "licenses": [ | ||
29 | { | ||
30 | "name": "MIT", | ||
31 | "url": "http://www.opensource.org/licenses/mit-license.php" | ||
32 | } | ||
33 | ], | ||
34 | "homepage": "http://n1k0.github.com/casperjs" | ||
35 | } |
-
Please register or sign in to post a comment