Skip to content

Commit

Permalink
Merge pull request #125 from sirbrillig/sirbrillig-add-babel-readme
Browse files Browse the repository at this point in the history
Update README to include Babel example
  • Loading branch information
pghalliday committed Jul 17, 2016
2 parents 977ec85 + 751b155 commit c09482e
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,24 @@ mochaTest: {
}
```

This is an example for the Babel 6 compiler ([babel must be configured](https://babeljs.io/docs/setup/) separately if you want to use it for something like ES6/ES2015).

```
npm install babel-register
```

```javascript
mochaTest: {
test: {
options: {
reporter: 'spec',
require: 'babel-register'
},
src: ['test/**/*.js']
}
}
```

In order to make this more user friendly, the `require` option can take either a single file/function or an array of files/functions in case you have other globals you wish to require.

eg.
Expand Down

0 comments on commit c09482e

Please sign in to comment.