mirror of https://github.com/lukechilds/rollup.git
10 changed files with 77 additions and 0 deletions
@ -0,0 +1,3 @@ |
|||||
|
module.exports = { |
||||
|
description: 'preserves comments before imports' |
||||
|
}; |
@ -0,0 +1,12 @@ |
|||||
|
define(function () { 'use strict'; |
||||
|
|
||||
|
// bar.js
|
||||
|
var bar = 21; |
||||
|
|
||||
|
// foo.js
|
||||
|
var foo = bar * 2; |
||||
|
|
||||
|
// main.js
|
||||
|
console.log( foo ); |
||||
|
|
||||
|
}); |
@ -0,0 +1,10 @@ |
|||||
|
'use strict'; |
||||
|
|
||||
|
// bar.js
|
||||
|
var bar = 21; |
||||
|
|
||||
|
// foo.js
|
||||
|
var foo = bar * 2; |
||||
|
|
||||
|
// main.js
|
||||
|
console.log( foo ); |
@ -0,0 +1,8 @@ |
|||||
|
// bar.js
|
||||
|
var bar = 21; |
||||
|
|
||||
|
// foo.js
|
||||
|
var foo = bar * 2; |
||||
|
|
||||
|
// main.js
|
||||
|
console.log( foo ); |
@ -0,0 +1,13 @@ |
|||||
|
(function () { |
||||
|
'use strict'; |
||||
|
|
||||
|
// bar.js
|
||||
|
var bar = 21; |
||||
|
|
||||
|
// foo.js
|
||||
|
var foo = bar * 2; |
||||
|
|
||||
|
// main.js
|
||||
|
console.log( foo ); |
||||
|
|
||||
|
}()); |
@ -0,0 +1,16 @@ |
|||||
|
(function (global, factory) { |
||||
|
typeof exports === 'object' && typeof module !== 'undefined' ? factory() : |
||||
|
typeof define === 'function' && define.amd ? define(factory) : |
||||
|
(factory()); |
||||
|
}(this, (function () { 'use strict'; |
||||
|
|
||||
|
// bar.js
|
||||
|
var bar = 21; |
||||
|
|
||||
|
// foo.js
|
||||
|
var foo = bar * 2; |
||||
|
|
||||
|
// main.js
|
||||
|
console.log( foo ); |
||||
|
|
||||
|
}))); |
@ -0,0 +1,2 @@ |
|||||
|
// bar.js
|
||||
|
export default 21; |
@ -0,0 +1,4 @@ |
|||||
|
// foo.js
|
||||
|
import bar from './bar.js'; |
||||
|
|
||||
|
export default bar * 2; |
@ -0,0 +1,4 @@ |
|||||
|
// main.js
|
||||
|
import foo from './foo.js'; |
||||
|
|
||||
|
console.log( foo ); |
Loading…
Reference in new issue