mirror of https://github.com/lukechilds/rollup.git
17 lines
343 B
17 lines
343 B
var assert = require( 'assert' );
|
|
|
|
module.exports = {
|
|
description: 'reports which file caused a transform error',
|
|
options: {
|
|
plugins: [{
|
|
transform: function ( code, id ) {
|
|
if ( /foo/.test( id ) ) {
|
|
throw new Error( 'nope' );
|
|
}
|
|
}
|
|
}]
|
|
},
|
|
error: function ( err ) {
|
|
assert.ok( ~err.message.indexOf( 'foo.js' ) );
|
|
}
|
|
};
|
|
|