babel-resolver
Advanced tools
Comparing version 0.0.14 to 0.0.15
v0.0.15 / 2015-11-13 | ||
==================== | ||
* bump version | ||
* add link to plugin version | ||
* readme language | ||
* italics | ||
* v0.0.14 | ||
v0.0.14 / 2015-11-11 | ||
@@ -3,0 +12,0 @@ ==================== |
{ | ||
"name": "babel-resolver", | ||
"version": "0.0.14", | ||
"version": "0.0.15", | ||
"description": "Resolve modules from any directory.", | ||
@@ -5,0 +5,0 @@ "main": "lib/createBabelResolver.js", |
# Babel Resolver [![NPM version][npm-image]][npm-url] [![Build status][travis-image]][travis-url] [![Coverage status][coveralls-image]][coveralls-url] | ||
*To configure this using .babelrc, use the [Babel Resolver Plugin](https://github.com/jshanson7/babel-plugin-resolver)* | ||
Resolve modules from any directory. | ||
@@ -38,3 +40,3 @@ | ||
**Note2:** Babel's `resolveModuleSource` is currently only called when you use `import 'module'`, not when use `require('module')` | ||
**Note2:** Babel's `resolveModuleSource` is only called when you use `import`, not `require`. | ||
@@ -46,3 +48,3 @@ Also, keep in mind that you must provide absolute directory paths to `babel-resolver`. | ||
In app/index.js: | ||
*In app/index.js:* | ||
@@ -53,7 +55,6 @@ ```javascript | ||
var anotherDirToCheck = path.resolve(__dirname, 'lib'); | ||
var resolver = require('babel-resolver')(localModulesDir, anotherDirToCheck); | ||
require('babel-core/register')({ | ||
presets: ['es2015'], | ||
resolveModuleSource: resolver | ||
resolveModuleSource: require('babel-resolver')(localModulesDir, anotherDirToCheck) | ||
}); | ||
@@ -63,3 +64,3 @@ require('./app'); | ||
In app/app.js: | ||
*In app/app.js:* | ||
@@ -83,3 +84,3 @@ ```javascript | ||
Setting `NODE_PATH=app` is a perfectly valid solution. `babel-resolver` is for those who: | ||
While setting `NODE_PATH=app` is a perfectly valid solution, `babel-resolver` is for those who: | ||
- find environment variables annoying | ||
@@ -86,0 +87,0 @@ - want to resolve modules from more than one directory |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
13400
94