mirror of https://github.com/lukechilds/rollup.git
10 changed files with 62 additions and 2 deletions
@ -0,0 +1,6 @@ |
|||||
|
module.exports = { |
||||
|
description: 'does not rewrite class declaration IDs', |
||||
|
options: { |
||||
|
moduleName: 'myModule' |
||||
|
} |
||||
|
}; |
@ -0,0 +1,6 @@ |
|||||
|
define(['exports'], function (exports) { 'use strict'; |
||||
|
|
||||
|
exports.Foo = class Foo {} |
||||
|
exports.Foo = lol( exports.Foo ); |
||||
|
|
||||
|
}); |
@ -0,0 +1,4 @@ |
|||||
|
'use strict'; |
||||
|
|
||||
|
exports.Foo = class Foo {} |
||||
|
exports.Foo = lol( exports.Foo ); |
@ -0,0 +1,4 @@ |
|||||
|
Foo = class Foo {} |
||||
|
Foo = lol( Foo ); |
||||
|
|
||||
|
export { Foo }; |
@ -0,0 +1,7 @@ |
|||||
|
(function (exports) { |
||||
|
'use strict'; |
||||
|
|
||||
|
exports.Foo = class Foo {} |
||||
|
exports.Foo = lol( exports.Foo ); |
||||
|
|
||||
|
}((this.myModule = this.myModule || {}))); |
@ -0,0 +1,10 @@ |
|||||
|
(function (global, factory) { |
||||
|
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : |
||||
|
typeof define === 'function' && define.amd ? define(['exports'], factory) : |
||||
|
(factory((global.myModule = global.myModule || {}))); |
||||
|
}(this, function (exports) { 'use strict'; |
||||
|
|
||||
|
exports.Foo = class Foo {} |
||||
|
exports.Foo = lol( exports.Foo ); |
||||
|
|
||||
|
})); |
@ -0,0 +1,2 @@ |
|||||
|
export let Foo = class Foo {} |
||||
|
Foo = lol( Foo ); |
@ -0,0 +1,15 @@ |
|||||
|
var assert = require( 'assert' ); |
||||
|
|
||||
|
module.exports = { |
||||
|
description: 'throws error if load returns something wacky', |
||||
|
options: { |
||||
|
plugins: [{ |
||||
|
load: function () { |
||||
|
return 42; |
||||
|
} |
||||
|
}] |
||||
|
}, |
||||
|
error: function ( err ) { |
||||
|
assert.ok( /load hook should return a string, a \{ code, map \} object, or nothing\/null/.test( err.message ) ); |
||||
|
} |
||||
|
}; |
Loading…
Reference in new issue