Skip to content

Commit

Permalink
Update commands documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
mxstbr committed Jan 26, 2016
1 parent ede0815 commit 4f83d4f
Showing 1 changed file with 49 additions and 7 deletions.
56 changes: 49 additions & 7 deletions docs/general/commands.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,28 +26,70 @@ $ npm run build

Gets your application ready for deployment. Optimizes and minifies all files, and generates a folder called `build`. `build` includes all files you need for your application. Upload the contents of `build` to your web server to see it live!

## Performance testing
## Testing

## Unit testing

```Shell
$ npm run test
```

Tests your application with the unit tests specified in the `*test.js` files throughout the application. This'll run the tests in Chrome, but you can choose different browsers.

### Browsers

To choose the browser to run your unit tests in (Chrome is run by default), run one of the following commands:

#### Firefox

```Shell
$ npm run test:firefox
```

#### Safari

```Shell
$ npm run test:safari
```

#### Internet Explorer

*Windows only!*

```Shell
$ npm run test:ie
```

### Watching

To watch changes to your application and rerun tests whenever a file changes run

```Shell
$ npm run test:watch
```

### Performance testing

```Shell
$ npm run pagespeed
```

With the development server running (i.e. while `$ npm start` is running in another tab), enter this command to run Google PageSpeed Insights and get a performance check right in your terminal!

## Browser testing
### Test around the world

```Shell
$ npm run serve
```

This will run a server that's accessible in the entire local network and shows the version of the app that's in the `build` folder. Useful for testing on different devices!
This will run a server that's accessible on the entire world and shows the version of the app that's in the `build` folder. Useful for testing on different devices in different locations!

> Note: This assumes you have done a build with `npm run build` before. The changes you make in your application won't be reflected in the application unless you run `npm run build` again.
## Unit testing
## Linting

Lint your JavaScript with this command.

```Shell
$ npm run test
$ npm run lint
```

Tests your application with the unit tests specified in the `test` folder.

0 comments on commit 4f83d4f

Please sign in to comment.