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
528 B
18 lines
528 B
9 years ago
|
var path = require( 'path' );
|
||
|
var assert = require( 'assert' );
|
||
|
|
||
|
var warned = false;
|
||
|
|
||
|
module.exports = {
|
||
|
description: 'warns about use of eval',
|
||
|
options: {
|
||
|
onwarn: function ( message ) {
|
||
|
warned = true;
|
||
|
assert.equal( message, 'Use of `eval` (in ' + path.resolve( __dirname, 'main.js' ) + ') is discouraged, as it may cause issues with minification. See https://github.com/rollup/rollup/wiki/Troubleshooting#avoiding-eval for more details' );
|
||
|
}
|
||
|
},
|
||
|
exports: function () {
|
||
|
assert.ok( warned, 'did not warn' );
|
||
|
}
|
||
|
};
|