mirror of https://github.com/lukechilds/rollup.git
Rich-Harris
10 years ago
4 changed files with 23 additions and 2 deletions
@ -0,0 +1,12 @@ |
|||||
|
var assert = require( 'assert' ); |
||||
|
|
||||
|
module.exports = { |
||||
|
description: 'renames variables named `exports` if necessary', |
||||
|
exports: function ( exports ) { |
||||
|
assert.deepEqual( Object.keys( exports ), [ 'a', 'b' ] ); |
||||
|
assert.equal( exports.a, 'A' ); |
||||
|
assert.equal( exports.b, 42 ); |
||||
|
}, |
||||
|
solo: true, |
||||
|
show: true |
||||
|
}; |
@ -0,0 +1,8 @@ |
|||||
|
var exports = { |
||||
|
number: 21 |
||||
|
}; |
||||
|
|
||||
|
export var a = 'A'; |
||||
|
export var b = exports.number * 2; |
||||
|
|
||||
|
assert.deepEqual( Object.keys( exports ), [ 'number' ]); |
Loading…
Reference in new issue