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.
18 lines
343 B
18 lines
343 B
9 years ago
|
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' ) );
|
||
|
}
|
||
|
};
|