mirror of https://github.com/lukechilds/rollup.git
Rich Harris
9 years ago
6 changed files with 63 additions and 7 deletions
@ -0,0 +1,10 @@ |
|||
var assert = require( 'assert' ); |
|||
|
|||
module.exports = { |
|||
description: 'allows destructuring in exported variable declarations, synthetic or otherwise', |
|||
babel: true, |
|||
exports: function ( exports ) { |
|||
assert.equal( exports.a, 1 ); |
|||
assert.equal( exports.d, 4 ); |
|||
} |
|||
}; |
@ -0,0 +1,11 @@ |
|||
let { a, b } = c(), [ d, e ] = f(); |
|||
|
|||
function c () { |
|||
return { a: 1, b: 2 }; |
|||
} |
|||
|
|||
function f () { |
|||
return [ 4, 5 ]; |
|||
} |
|||
|
|||
export { a, d }; |
@ -0,0 +1,8 @@ |
|||
var assert = require( 'assert' ); |
|||
|
|||
module.exports = { |
|||
description: 'removes empty exported var declarations', |
|||
exports: function ( exports ) { |
|||
assert.equal( exports.foo, 42 ); |
|||
} |
|||
}; |
@ -0,0 +1,4 @@ |
|||
var foo; |
|||
foo = 42; |
|||
|
|||
export { foo }; |
Loading…
Reference in new issue