mirror of https://github.com/lukechilds/rollup.git
Rich-Harris
9 years ago
9 changed files with 40 additions and 1 deletions
@ -0,0 +1,8 @@ |
|||||
|
module.exports = { |
||||
|
solo: true, |
||||
|
show: true, |
||||
|
description: 'use of arguments is treated as a side-effect', |
||||
|
options: { |
||||
|
moduleName: 'myBundle' |
||||
|
} |
||||
|
}; |
@ -0,0 +1,5 @@ |
|||||
|
define(function () { 'use strict'; |
||||
|
|
||||
|
|
||||
|
|
||||
|
}); |
@ -0,0 +1 @@ |
|||||
|
'use strict'; |
@ -0,0 +1,19 @@ |
|||||
|
export function augment ( x ) { |
||||
|
var prop, source; |
||||
|
|
||||
|
var i = arguments.length; |
||||
|
var sources = Array( i - 1 ); |
||||
|
while ( i-- ) { |
||||
|
sources[i-1] = arguments[i]; |
||||
|
} |
||||
|
|
||||
|
while (source = sources.shift()) { |
||||
|
for (prop in source) { |
||||
|
if (hasOwn.call(source, prop)) { |
||||
|
x[prop] = source[prop]; |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
return x; |
||||
|
} |
@ -0,0 +1,4 @@ |
|||||
|
import { augment } from './foo.js'; |
||||
|
|
||||
|
export default function x () {} |
||||
|
augment( x.prototype ); |
Loading…
Reference in new issue