Skip to content

Commit

Permalink
Close #333 PR: Upgrade to Babel 6. Fixes #221, Fixes #148, Fixes #148
Browse files Browse the repository at this point in the history
  • Loading branch information
jamestalmage authored and sindresorhus committed Dec 22, 2015
1 parent d4d8310 commit 9c32200
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 9 deletions.
2 changes: 2 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,7 @@ node_js:
- 'stable'
- '0.12'
- '0.10'
before_install:
- 'npm i -g npm@latest'
after_success:
- '[ -z "$COVERALLS_REPO_TOKEN" ] && tap --coverage-report=text-lcov | ./node_modules/.bin/coveralls'
9 changes: 3 additions & 6 deletions lib/babel.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ sourceMapSupport.install({
var createEspowerPlugin = require('babel-plugin-espower/create');
var requireFromString = require('require-from-string');
var loudRejection = require('loud-rejection/api')(process);
var hasGenerator = require('has-generator');
var serializeError = require('serialize-error');
var babel = require('babel-core');
var send = require('./send');
Expand All @@ -53,11 +52,9 @@ var powerAssert = createEspowerPlugin(babel, {

// if generators are not supported, use regenerator
var options = {
blacklist: hasGenerator ? ['regenerator'] : [],
optional: hasGenerator ? ['asyncToGenerator', 'runtime'] : ['runtime'],
plugins: [powerAssert],
sourceMaps: true,
inputSourceMap: null
presets: ['stage-2', 'es2015'],
plugins: [powerAssert, 'transform-runtime'],
sourceMaps: true
};

// check if test files required ava and show error, when they didn't
Expand Down
9 changes: 6 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,12 @@
"arr-flatten": "^1.0.1",
"arrify": "^1.0.0",
"ava-init": "^0.1.0",
"babel-core": "^5.8.23",
"babel-plugin-espower": "^1.1.0",
"babel-runtime": "^5.8.29",
"babel-core": "^6.3.17",
"babel-plugin-espower": "^2.0.0",
"babel-plugin-transform-runtime": "^6.3.13",
"babel-preset-es2015": "^6.3.13",
"babel-preset-stage-2": "^6.3.13",
"babel-runtime": "^6.3.19",
"bluebird": "^3.0.0",
"chalk": "^1.0.0",
"co-with-promise": "^4.6.0",
Expand Down

0 comments on commit 9c32200

Please sign in to comment.