mirror of https://github.com/lukechilds/rollup.git
Rich Harris
9 years ago
7 changed files with 65 additions and 0 deletions
@ -0,0 +1,7 @@ |
|||
module.exports = { |
|||
description: 'exports variables at end, if possible', |
|||
options: { |
|||
moduleName: 'myBundle' |
|||
}, |
|||
solo: true |
|||
}; |
@ -0,0 +1,11 @@ |
|||
define(['exports'], function (exports) { 'use strict'; |
|||
|
|||
var FOO = 'foo'; |
|||
|
|||
console.log( FOO ); |
|||
console.log( FOO ); |
|||
console.log( FOO ); |
|||
|
|||
exports.FOO = FOO; |
|||
|
|||
}); |
@ -0,0 +1,9 @@ |
|||
'use strict'; |
|||
|
|||
var FOO = 'foo'; |
|||
|
|||
console.log( FOO ); |
|||
console.log( FOO ); |
|||
console.log( FOO ); |
|||
|
|||
exports.FOO = FOO; |
@ -0,0 +1,7 @@ |
|||
const FOO = 'foo'; |
|||
|
|||
console.log( FOO ); |
|||
console.log( FOO ); |
|||
console.log( FOO ); |
|||
|
|||
export { FOO }; |
@ -0,0 +1,11 @@ |
|||
(function (exports) { 'use strict'; |
|||
|
|||
var FOO = 'foo'; |
|||
|
|||
console.log( FOO ); |
|||
console.log( FOO ); |
|||
console.log( FOO ); |
|||
|
|||
exports.FOO = FOO; |
|||
|
|||
})((this.myBundle = {})); |
@ -0,0 +1,15 @@ |
|||
(function (global, factory) { |
|||
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : |
|||
typeof define === 'function' && define.amd ? define(['exports'], factory) : |
|||
factory((global.myBundle = {})); |
|||
}(this, function (exports) { 'use strict'; |
|||
|
|||
var FOO = 'foo'; |
|||
|
|||
console.log( FOO ); |
|||
console.log( FOO ); |
|||
console.log( FOO ); |
|||
|
|||
exports.FOO = FOO; |
|||
|
|||
})); |
@ -0,0 +1,5 @@ |
|||
export var FOO = 'foo'; |
|||
|
|||
console.log( FOO ); |
|||
console.log( FOO ); |
|||
console.log( FOO ); |
Loading…
Reference in new issue