Browse Source

Merge branch 'master' of https://github.com/mbostock/rollup into mbostock-master

contingency-plan
Rich-Harris 10 years ago
parent
commit
9e59e610d1
  1. 2
      src/Module.js
  2. 2
      src/Statement.js
  3. 2
      src/finalisers/umd.js

2
src/Module.js

@ -43,7 +43,7 @@ export default class Module {
});
this.statements = ast.body.map( node => {
const magicString = this.magicString.snip( node.start, node.end );
const magicString = this.magicString.snip( node.start, node.end ).prepend( '\n' ).append( '\n' );
return new Statement( node, magicString, this );
});
} catch ( err ) {

2
src/Statement.js

@ -248,7 +248,7 @@ export default class Statement {
}
replaceIdentifiers ( names ) {
const magicString = this.magicString.clone().trim();
const magicString = this.magicString.clone();
const replacementStack = [ names ];
const nameList = keys( names );

2
src/finalisers/umd.js

@ -16,7 +16,7 @@ export default function umd ( bundle, magicString, exportMode, options ) {
if ( exportMode === 'named' ) {
amdDeps.unshift( `'exports'` );
cjsDeps.unshift( `'exports'` );
cjsDeps.unshift( `exports` );
globalDeps.unshift( `(global.${options.moduleName} = {})` );
args.unshift( 'exports' );

Loading…
Cancel
Save