babel-resolver
Advanced tools
Comparing version 0.0.6 to 0.0.7
v0.0.7 / 2015-11-11 | ||
=================== | ||
* more tests | ||
* add comment | ||
v0.0.6 / 2015-11-11 | ||
=================== | ||
* bump version | ||
* more typos | ||
* typos | ||
* update changelog | ||
v0.0.4 / 2015-11-11 | ||
@@ -19,6 +33,1 @@ =================== | ||
* initial commit | ||
master / 2015-11-11 | ||
=================== | ||
* initial commit |
@@ -1,5 +0,3 @@ | ||
var resolve = require('path').resolve; | ||
var pathIsRelative = require('./pathIsRelative'); | ||
var findNodeModulesPath = require('./findNodeModulesPath'); | ||
var autoExtensionedPathExists = require('./autoExtensionedPathExists'); | ||
var resolveModuleSource = require('./resolveModuleSource'); | ||
@@ -15,13 +13,6 @@ module.exports = function createBabelResolver() { | ||
return function resolveModuleSource(source) { | ||
if (pathIsRelative(source)) { return source; } | ||
var currentPath; | ||
var foundModuleDir = moduleDirsToCheck.find(function (dir) { | ||
currentPath = resolve(dir, source); | ||
return autoExtensionedPathExists(currentPath, extensionsToTry); | ||
}); | ||
return foundModuleDir ? currentPath : source; | ||
return function (source) { | ||
return resolveModuleSource(source, moduleDirsToCheck, extensionsToTry); | ||
}; | ||
}; | ||
{ | ||
"name": "babel-resolver", | ||
"version": "0.0.6", | ||
"version": "0.0.7", | ||
"description": "Resolve modules from any directory.", | ||
@@ -8,3 +8,3 @@ "main": "lib/createBabelResolver.js", | ||
"test": "npm run lint && node_modules/.bin/mocha test/**/*.test.js -t 10000", | ||
"lint": "./node_modules/.bin/eslint .", | ||
"lint": "./node_modules/.bin/eslint lib test", | ||
"cover": "npm run istanbul && npm run coveralls", | ||
@@ -11,0 +11,0 @@ "istanbul": "node node_modules/.bin/istanbul cover node_modules/.bin/_mocha --report lcovonly", |
12062
27
207