mirror of https://github.com/lukechilds/rollup.git
Rich Harris
9 years ago
9 changed files with 77 additions and 2 deletions
@ -0,0 +1,3 @@ |
|||
export default function callIfFunction ( thing ) { |
|||
return typeof thing === 'function' ? thing() : thing; |
|||
} |
@ -0,0 +1,15 @@ |
|||
module.exports = { |
|||
description: 'allows plugins to set banner and footer options', |
|||
options: { |
|||
plugins: [ |
|||
{ |
|||
banner: '/* first banner */', |
|||
footer: function () { return '/* first footer */'; } |
|||
}, |
|||
{ |
|||
banner: function () { return '/* second banner */'; }, |
|||
footer: '/* second footer */' |
|||
} |
|||
] |
|||
} |
|||
} |
@ -0,0 +1,9 @@ |
|||
/* first banner */ |
|||
/* second banner */ |
|||
define(function () { 'use strict'; |
|||
|
|||
console.log( 1 + 1 ); |
|||
|
|||
}); |
|||
/* first footer */ |
|||
/* second footer */ |
@ -0,0 +1,7 @@ |
|||
/* first banner */ |
|||
/* second banner */ |
|||
'use strict'; |
|||
|
|||
console.log( 1 + 1 ); |
|||
/* first footer */ |
|||
/* second footer */ |
@ -0,0 +1,5 @@ |
|||
/* first banner */ |
|||
/* second banner */ |
|||
console.log( 1 + 1 ); |
|||
/* first footer */ |
|||
/* second footer */ |
@ -0,0 +1,9 @@ |
|||
/* first banner */ |
|||
/* second banner */ |
|||
(function () { 'use strict'; |
|||
|
|||
console.log( 1 + 1 ); |
|||
|
|||
})(); |
|||
/* first footer */ |
|||
/* second footer */ |
@ -0,0 +1,13 @@ |
|||
/* first banner */ |
|||
/* second banner */ |
|||
(function (global, factory) { |
|||
typeof exports === 'object' && typeof module !== 'undefined' ? factory() : |
|||
typeof define === 'function' && define.amd ? define(factory) : |
|||
factory(); |
|||
}(this, function () { 'use strict'; |
|||
|
|||
console.log( 1 + 1 ); |
|||
|
|||
})); |
|||
/* first footer */ |
|||
/* second footer */ |
@ -0,0 +1 @@ |
|||
console.log( 1 + 1 ); |
Loading…
Reference in new issue