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.
27 lines
613 B
27 lines
613 B
var path = require( 'path' );
|
|
var assert = require( 'assert' );
|
|
|
|
module.exports = {
|
|
description: 'uses custom path resolvers (plural)',
|
|
options: {
|
|
plugins: [
|
|
{
|
|
resolveId: function ( importee ) {
|
|
if ( importee[0] === '@' )
|
|
return path.resolve( __dirname, 'globals-' + importee.slice( 1 ).toLowerCase() + '.js' );
|
|
},
|
|
load: function ( id ) {
|
|
if ( id === '<empty>' ) return '';
|
|
}
|
|
},
|
|
{
|
|
resolveId: function ( importee ) {
|
|
if ( importee[0] === '!' ) return '<empty>';
|
|
}
|
|
}
|
|
]
|
|
},
|
|
exports: function ( exports ) {
|
|
assert.strictEqual( exports.res, 0 );
|
|
}
|
|
};
|
|
|