Skip to content

Commit 59e00d9

Browse files
committed
use local casperjs & update dev setup guide
1 parent 0031c60 commit 59e00d9

File tree

3 files changed

+8
-10
lines changed

3 files changed

+8
-10
lines changed

CONTRIBUTING.md

+6-9
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,10 @@ Hi! I’m really excited that you are interested in contributing to Vue.js. Befo
4444

4545
## Development Setup
4646

47-
You will need [Node](http://nodejs.org), [Grunt](http://gruntjs.com), [PhantomJS](http://phantomjs.org) and [CasperJS](http://casperjs.org).
47+
You will need [Node.js](http://nodejs.org) & [Grunt](http://gruntjs.com).
4848

4949
``` bash
50-
# in case you don’t already these:
51-
# npm install -g grunt-cli phantomjs casperjs
50+
# npm install -g grunt-cli
5251
$ npm install
5352
```
5453

@@ -61,7 +60,7 @@ $ npm run dev
6160
To lint:
6261

6362
``` bash
64-
grunt jshint
63+
$ grunt jshint
6564
```
6665

6766
To build:
@@ -73,13 +72,11 @@ $ grunt build
7372
To test:
7473

7574
``` bash
76-
# if you don’t have these yet:
77-
# npm install -g phantomjs casperjs
7875
$ grunt test
7976
```
8077

81-
The unit tests are written with Jasmine and run with Karma. The functional tests are written for and run with CasperJS.
78+
The default task (by simply running `grunt`) will do the following: lint -> build -> unit tests -> e2e tests. It is required to have this pass successfully for a PR to be considered.
8279

83-
**If you are not using a Mac**
80+
The unit tests are written with Jasmine and run with Karma. The e2e tests are written for and run with CasperJS.
8481

85-
You can modify the Gruntfile to only run Karma tests in browsers that are available on your system. Just make sure don’t check in the Gruntfile for the commit.
82+
Note that the unit tests will automatically be run in Chrome, Firefox and Safari. If you are not on a Mac, or don't have one of the browsers installed on your system, you can modify the [karma config in gruntfile.js](https://github.com/yyx990803/vue/blob/dev/gruntfile.js#L42) to only run Karma tests in browsers that are available on your system. Just make sure don’t check in the gruntfile changes for the commit.

build/grunt-tasks/casper.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ module.exports = function (grunt) {
88
var done = this.async()
99
var file = id ? id + '.js' : ''
1010
grunt.util.spawn({
11-
cmd: 'casperjs',
11+
cmd: '../../node_modules/.bin/casperjs',
1212
args: ['test', '--concise', './' + file],
1313
opts: {
1414
stdio: ['ignore', process.stdout, 'ignore'],

package.json

+1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
"dev": "webpack --watch --config build/webpack-dev-config.js & webpack --watch --config build/webpack-test-config.js"
2222
},
2323
"devDependencies": {
24+
"casperjs": "^1.1.0-beta3",
2425
"grunt": "^0.4.5",
2526
"grunt-contrib-jshint": "^0.10.0",
2627
"grunt-karma": "^0.8.3",

0 commit comments

Comments
 (0)