|
@ -1,12 +1,12 @@ |
|
|
|
|
|
var path = require( 'path' ); |
|
|
var assert = require( 'assert' ); |
|
|
var assert = require( 'assert' ); |
|
|
|
|
|
|
|
|
module.exports = { |
|
|
module.exports = { |
|
|
description: 'uses a custom path resolver (synchronous)', |
|
|
description: 'uses a custom path resolver (synchronous)', |
|
|
options: { |
|
|
options: { |
|
|
resolvePath: function ( importee, importer ) { |
|
|
resolvePath: function ( importee, importer ) { |
|
|
if ( importee === 'foo' ) { |
|
|
if ( importee === path.resolve( __dirname, 'main.js' ) ) return importee; |
|
|
return require( 'path' ).resolve( __dirname, 'bar.js' ); |
|
|
if ( importee === 'foo' ) return path.resolve( __dirname, 'bar.js' ); |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
return false; |
|
|
return false; |
|
|
} |
|
|
} |
|
|