Skip to content
This repository was archived by the owner on Nov 8, 2024. It is now read-only.

Commit fd786bd

Browse files
committed
Merge pull request #398 from apiaryio/babel-support-doc
Babel support documentation
2 parents 7ead499 + fe66ebb commit fd786bd

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

docs/hooks-nodejs.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -236,3 +236,18 @@ hooks.beforeEach(function(transaction) {
236236
}
237237
});
238238
```
239+
240+
### Using Babel
241+
242+
With this workaround you can use [Babel](https://babeljs.io/) for support of all the latest JS syntactic coolness in Dredd hooks:
243+
244+
```
245+
npm install -g babel-cli babel-preset-es2015
246+
echo '{ "presets": ["es2015"] }' > .babelrc
247+
babel-node `which dredd` test/fixtures/single-get.apib http://localhost:3000 --hookfiles=./es2015.js
248+
```
249+
250+
251+
252+
253+

0 commit comments

Comments
 (0)