You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- 1 space between arguments, but not between parentheses.
49
-
- When in doubt, read the source code.
52
+
50
53
- Break long ternary conditionals like this:
51
54
52
55
```js
@@ -55,6 +58,8 @@ Hi! I’m really excited that you are interested in contributing to Vue.js. Befo
55
58
:'nope'
56
59
```
57
60
61
+
- When in doubt, read the source code.
62
+
58
63
## Development Setup
59
64
60
65
You will need [Node.js](http://nodejs.org) & [Grunt](http://gruntjs.com).
@@ -66,12 +71,18 @@ $ npm install
66
71
$ npm run install-hook
67
72
```
68
73
69
-
To watch and auto-build `dist/vue.js` during development:
74
+
Dev mode: watch and auto-build `dist/vue.js` and unit tests during development:
70
75
71
76
```bash
72
77
$ npm run dev
73
78
```
74
79
80
+
The unit tests can be run in a browser by opening `test/unit/runner.html`. Make sure you are running dev mode first. There's a shortcut grunt task for opening the unit test page:
81
+
82
+
```bash
83
+
$ grunt open
84
+
```
85
+
75
86
To lint:
76
87
77
88
```bash
@@ -84,7 +95,7 @@ To build:
84
95
$ grunt build
85
96
```
86
97
87
-
To test:
98
+
Run full test suite (see browser notes below):
88
99
89
100
```bash
90
101
$ grunt test
@@ -94,4 +105,6 @@ The default task (by simply running `grunt`) will do the following: lint -> buil
94
105
95
106
The unit tests are written with Jasmine and run with Karma. The e2e tests are written for and run with CasperJS.
96
107
97
-
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/vuejs/vue/blob/dev/gruntfile.js#L38) 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.
108
+
### Test Browser Notes
109
+
110
+
When running the default `grunt` task, 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/vuejs/vue/blob/dev/gruntfile.js#L38) 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.
0 commit comments