mirror of https://github.com/lukechilds/rollup.git
Rich Harris
8 years ago
committed by
GitHub
40 changed files with 87 additions and 37 deletions
@ -1,5 +1,8 @@ |
|||
import Statement from './shared/Statement.js'; |
|||
|
|||
export default class ExpressionStatement extends Statement { |
|||
|
|||
render ( code, es ) { |
|||
super.render( code, es ); |
|||
if ( this.shouldInclude ) this.insertSemicolon( code ); |
|||
} |
|||
} |
|||
|
@ -1,4 +1,4 @@ |
|||
let Foo = class Foo {} |
|||
let Foo = class Foo {}; |
|||
Foo = lol( Foo ); |
|||
|
|||
export { Foo }; |
|||
|
@ -1,7 +1,7 @@ |
|||
(function (exports) { |
|||
'use strict'; |
|||
|
|||
exports.Foo = class Foo {} |
|||
exports.Foo = class Foo {}; |
|||
exports.Foo = lol( exports.Foo ); |
|||
|
|||
}((this.myModule = this.myModule || {}))); |
|||
|
@ -1,5 +1,5 @@ |
|||
var foo = function () { |
|||
return 42; |
|||
} |
|||
}; |
|||
|
|||
console.log( foo() ); |
|||
|
@ -0,0 +1,3 @@ |
|||
module.exports = { |
|||
description: 'adds semi-colons if necessary' |
|||
}; |
@ -0,0 +1 @@ |
|||
assert.ok( true ) |
@ -0,0 +1,3 @@ |
|||
import './foo.js'; |
|||
|
|||
(function bar() {})(); |
@ -0,0 +1,3 @@ |
|||
module.exports = { |
|||
description: 'adds semi-colons if necessary' |
|||
}; |
@ -0,0 +1,3 @@ |
|||
export default function () { |
|||
return 42; |
|||
} |
@ -0,0 +1,7 @@ |
|||
import foo from './foo.js'; |
|||
|
|||
(function bar() { |
|||
assert.ok( true ); |
|||
})(); |
|||
|
|||
assert.equal( foo(), 42 ); |
@ -0,0 +1,3 @@ |
|||
module.exports = { |
|||
description: 'adds semi-colons if necessary' |
|||
}; |
@ -0,0 +1,3 @@ |
|||
export var foo = function () { |
|||
return 42; |
|||
} |
@ -0,0 +1,7 @@ |
|||
import { foo } from './foo.js'; |
|||
|
|||
(function bar() { |
|||
assert.ok( true ); |
|||
})(); |
|||
|
|||
assert.equal( foo(), 42 ); |
Loading…
Reference in new issue