mirror of https://github.com/lukechilds/rollup.git
Rich-Harris
10 years ago
5 changed files with 41 additions and 21 deletions
@ -0,0 +1,11 @@ |
|||||
|
export default function es6 ( bundle, magicString, exportMode, options ) { |
||||
|
|
||||
|
const intro = `(function () { 'use strict';\n\n`; |
||||
|
const outro = `\n\n})();`; |
||||
|
|
||||
|
return magicString |
||||
|
.trim() |
||||
|
.indent() |
||||
|
.prepend( intro ) |
||||
|
.append( outro ); |
||||
|
} |
@ -1,6 +1,7 @@ |
|||||
import amd from './amd'; |
import amd from './amd'; |
||||
import cjs from './cjs'; |
import cjs from './cjs'; |
||||
import es6 from './es6'; |
import es6 from './es6'; |
||||
|
import iife from './iife'; |
||||
import umd from './umd'; |
import umd from './umd'; |
||||
|
|
||||
export default { amd, cjs, es6, umd }; |
export default { amd, cjs, es6, iife, umd }; |
||||
|
@ -0,0 +1,5 @@ |
|||||
|
(function () { 'use strict'; |
||||
|
|
||||
|
console.log( 'this is it' ); |
||||
|
|
||||
|
})(); |
Loading…
Reference in new issue