Skip to content

Commit

Permalink
add ava modules to test module paths
Browse files Browse the repository at this point in the history
Closes avajs#144
  • Loading branch information
floatdrop committed Nov 7, 2015
1 parent 08854a9 commit 1786c69
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/babel.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
var resolveFrom = require('resolve-from');
var createEspowerPlugin = require('babel-plugin-espower/create');
var requireFromString = require('require-from-string');
var resolve = require('path').resolve;
var hasGenerators = parseInt(process.version.slice(1), 10) > 0;
var path = process.argv[2];

Expand All @@ -25,4 +26,6 @@ var options = {
};

var transpiled = babel.transformFileSync(path, options);
requireFromString(transpiled.code, path);
requireFromString(transpiled.code, path, {
appendPaths: [resolve('../node_modules')]
});

0 comments on commit 1786c69

Please sign in to comment.