mirror of https://github.com/lukechilds/rollup.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
560 B
24 lines
560 B
9 years ago
|
var path = require( 'path' );
|
||
|
var assert = require( 'assert' );
|
||
|
|
||
|
module.exports = {
|
||
|
description: 'uses custom path resolvers (plural)',
|
||
|
options: {
|
||
|
resolveId: [
|
||
|
function ( importee ) {
|
||
|
if ( importee[0] === '@' )
|
||
|
return path.resolve( __dirname, 'globals-' + importee.slice( 1 ).toLowerCase() + '.js' );
|
||
|
},
|
||
|
function ( importee ) {
|
||
|
if ( importee[0] === '!' ) return '<empty>';
|
||
|
}
|
||
|
],
|
||
|
load: function ( id ) {
|
||
|
if ( id === '<empty>' ) return '';
|
||
|
}
|
||
|
},
|
||
|
exports: function ( exports ) {
|
||
|
assert.strictEqual( exports.res, 0 );
|
||
|
}
|
||
|
};
|