Browse Source

Merge branch 'bmaurer-patch-1'

rollup-init
Rich-Harris 9 years ago
parent
commit
61a66a991d
  1. 4
      src/finalisers/umd.js
  2. 4
      test/cli/indent-none/_expected.js
  3. 4
      test/cli/module-name/_expected.js
  4. 4
      test/form/absolute-path-resolver/_expected/umd.js
  5. 4
      test/form/assignment-to-exports-class-declaration/_expected/umd.js
  6. 4
      test/form/assignment-to-exports/_expected/umd.js
  7. 4
      test/form/banner-and-footer-plugin/_expected/umd.js
  8. 4
      test/form/banner-and-footer/_expected/umd.js
  9. 4
      test/form/block-comments/_expected/umd.js
  10. 4
      test/form/computed-properties/_expected/umd.js
  11. 4
      test/form/conflicting-imports/_expected/umd.js
  12. 4
      test/form/dedupes-external-imports/_expected/umd.js
  13. 4
      test/form/erroneous-nested-member-expression/_expected/umd.js
  14. 4
      test/form/exclude-unnecessary-modifications/_expected/umd.js
  15. 4
      test/form/export-all-from-internal/_expected/umd.js
  16. 4
      test/form/export-default-2/_expected/umd.js
  17. 4
      test/form/export-default-3/_expected/umd.js
  18. 4
      test/form/export-default-import/_expected/umd.js
  19. 4
      test/form/export-default/_expected/umd.js
  20. 4
      test/form/export-multiple-vars/_expected/umd.js
  21. 4
      test/form/exports-at-end-if-possible/_expected/umd.js
  22. 4
      test/form/external-import-alias-shadow/_expected/umd.js
  23. 4
      test/form/external-imports-custom-names-function/_expected/umd.js
  24. 4
      test/form/external-imports-custom-names/_expected/umd.js
  25. 4
      test/form/external-imports/_expected/umd.js
  26. 4
      test/form/import-external-namespace-and-default/_expected/umd.js
  27. 4
      test/form/import-named-exported-global-with-alias/_expected/umd.js
  28. 4
      test/form/indent-false/_expected/umd.js
  29. 4
      test/form/indent-true-spaces/_expected/umd.js
  30. 4
      test/form/indent-true/_expected/umd.js
  31. 4
      test/form/internal-conflict-resolution/_expected/umd.js
  32. 4
      test/form/intro-and-outro/_expected/umd.js
  33. 4
      test/form/multiple-exports/_expected/umd.js
  34. 4
      test/form/namespace-optimization-b/_expected/umd.js
  35. 4
      test/form/namespace-optimization/_expected/umd.js
  36. 4
      test/form/namespaced-default-exports/_expected/umd.js
  37. 4
      test/form/namespaced-named-exports/_expected/umd.js
  38. 4
      test/form/no-imports-or-exports/_expected/umd.js
  39. 4
      test/form/no-treeshake/_expected/umd.js
  40. 4
      test/form/object-destructuring-default-values/_expected/umd.js
  41. 4
      test/form/paths-function/_expected/umd.js
  42. 4
      test/form/paths-relative/_expected/umd.js
  43. 4
      test/form/paths/_expected/umd.js
  44. 4
      test/form/prefer-const/_expected/umd.js
  45. 4
      test/form/preserve-debugger/_expected/umd.js
  46. 4
      test/form/preserves-comments-after-imports/_expected/umd.js
  47. 4
      test/form/relative-external-with-global/_expected/umd.js
  48. 4
      test/form/removes-existing-sourcemap-comments/_expected/umd.js
  49. 4
      test/form/self-contained-bundle/_expected/umd.js
  50. 4
      test/form/shorthand-properties/_expected/umd.js
  51. 4
      test/form/side-effect-b/_expected/umd.js
  52. 4
      test/form/side-effect-c/_expected/umd.js
  53. 4
      test/form/side-effect-d/_expected/umd.js
  54. 4
      test/form/side-effect-e/_expected/umd.js
  55. 4
      test/form/side-effect-f/_expected/umd.js
  56. 4
      test/form/side-effect-g/_expected/umd.js
  57. 4
      test/form/side-effect-h/_expected/umd.js
  58. 4
      test/form/side-effect-i/_expected/umd.js
  59. 4
      test/form/side-effect-j/_expected/umd.js
  60. 4
      test/form/side-effect-k/_expected/umd.js
  61. 4
      test/form/side-effect-l/_expected/umd.js
  62. 4
      test/form/side-effect-m/_expected/umd.js
  63. 4
      test/form/side-effect-n/_expected/umd.js
  64. 4
      test/form/side-effect-o/_expected/umd.js
  65. 4
      test/form/side-effect/_expected/umd.js
  66. 4
      test/form/sourcemaps-external/_expected/umd.js
  67. 4
      test/form/sourcemaps-inline/_expected/umd.js
  68. 4
      test/form/spacing-after-function-with-semicolon/_expected/umd.js
  69. 4
      test/form/string-indentation-b/_expected/umd.js
  70. 4
      test/form/string-indentation/_expected/umd.js
  71. 4
      test/form/this-is-undefined/_expected/umd.js
  72. 4
      test/form/umd-noconflict/_expected/umd.js
  73. 4
      test/form/unmodified-default-exports-function-argument/_expected/umd.js
  74. 4
      test/form/unmodified-default-exports/_expected/umd.js
  75. 4
      test/form/unused-default-exports/_expected/umd.js
  76. 4
      test/form/whitespace-around-namespace-member-expression/_expected/umd.js

4
src/finalisers/umd.js

@ -59,7 +59,7 @@ export default function umd ( bundle, magicString, { exportMode, indentString },
typeof exports === 'object' && typeof module !== 'undefined' ? ${cjsExport}factory(${cjsDeps.join( ', ' )}) :
typeof define === 'function' && define.amd ? define(${amdParams}factory) :
${globalExport};
}(this, function (${args}) {${useStrict}
}(this, (function (${args}) {${useStrict}
`.replace( /^\t\t/gm, '' ).replace( /^\t/gm, magicString.getIndentString() );
@ -77,6 +77,6 @@ export default function umd ( bundle, magicString, { exportMode, indentString },
return magicString
.trim()
.indent( indentString )
.append( '\n\n}));' )
.append( '\n\n})));' )
.prepend( intro );
}

4
test/cli/indent-none/_expected.js

@ -2,8 +2,8 @@
typeof exports === 'object' && typeof module !== 'undefined' ? factory() :
typeof define === 'function' && define.amd ? define(factory) :
(factory());
}(this, function () { 'use strict';
}(this, (function () { 'use strict';
assert.equal( 1 + 1, 2 );
}));
})));

4
test/cli/module-name/_expected.js

@ -2,10 +2,10 @@
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
typeof define === 'function' && define.amd ? define(factory) :
(global.myBundle = factory());
}(this, function () { 'use strict';
}(this, (function () { 'use strict';
var main = 42;
return main;
}));
})));

4
test/form/absolute-path-resolver/_expected/umd.js

@ -2,7 +2,7 @@
typeof exports === 'object' && typeof module !== 'undefined' ? factory() :
typeof define === 'function' && define.amd ? define(factory) :
(factory());
}(this, function () { 'use strict';
}(this, (function () { 'use strict';
var a = () => {
console.log('props');
@ -11,4 +11,4 @@
a();
a();
}));
})));

4
test/form/assignment-to-exports-class-declaration/_expected/umd.js

@ -2,11 +2,11 @@
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';
}(this, (function (exports) { 'use strict';
exports.Foo = class Foo {}
exports.Foo = lol( exports.Foo );
Object.defineProperty(exports, '__esModule', { value: true });
}));
})));

4
test/form/assignment-to-exports/_expected/umd.js

@ -2,10 +2,10 @@
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
typeof define === 'function' && define.amd ? define(['exports'], factory) :
(factory((global.bundle = global.bundle || {})));
}(this, function (exports) { 'use strict';
}(this, (function (exports) { 'use strict';
exports.foo = 1;
Object.defineProperty(exports, '__esModule', { value: true });
}));
})));

4
test/form/banner-and-footer-plugin/_expected/umd.js

@ -4,10 +4,10 @@
typeof exports === 'object' && typeof module !== 'undefined' ? factory() :
typeof define === 'function' && define.amd ? define(factory) :
(factory());
}(this, function () { 'use strict';
}(this, (function () { 'use strict';
console.log( 1 + 1 );
}));
})));
/* first footer */
/* second footer */

4
test/form/banner-and-footer/_expected/umd.js

@ -3,9 +3,9 @@
typeof exports === 'object' && typeof module !== 'undefined' ? factory() :
typeof define === 'function' && define.amd ? define(factory) :
(factory());
}(this, function () { 'use strict';
}(this, (function () { 'use strict';
console.log( 'hello world' );
}));
})));
/* this is a footer */

4
test/form/block-comments/_expected/umd.js

@ -2,7 +2,7 @@
typeof exports === 'object' && typeof module !== 'undefined' ? factory() :
typeof define === 'function' && define.amd ? define(factory) :
(factory());
}(this, function () { 'use strict';
}(this, (function () { 'use strict';
function foo () {
return embiggen( 6, 7 );
@ -20,4 +20,4 @@
alert( foo() );
}));
})));

4
test/form/computed-properties/_expected/umd.js

@ -2,7 +2,7 @@
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
typeof define === 'function' && define.amd ? define(['exports'], factory) :
(factory((global.computedProperties = global.computedProperties || {})));
}(this, function (exports) { 'use strict';
}(this, (function (exports) { 'use strict';
var foo = 'foo';
var bar = 'bar';
@ -22,4 +22,4 @@
Object.defineProperty(exports, '__esModule', { value: true });
}));
})));

4
test/form/conflicting-imports/_expected/umd.js

@ -2,10 +2,10 @@
typeof exports === 'object' && typeof module !== 'undefined' ? factory(require('foo'), require('bar')) :
typeof define === 'function' && define.amd ? define(['foo', 'bar'], factory) :
(factory(global.foo,global.bar));
}(this, function (foo,bar) { 'use strict';
}(this, (function (foo,bar) { 'use strict';
console.log( bar.a );
console.log( foo.a );
}));
})));

4
test/form/dedupes-external-imports/_expected/umd.js

@ -2,7 +2,7 @@
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('external')) :
typeof define === 'function' && define.amd ? define(['exports', 'external'], factory) :
(factory((global.myBundle = global.myBundle || {}),global.external));
}(this, function (exports,external) { 'use strict';
}(this, (function (exports,external) { 'use strict';
class Foo extends external.Component {
constructor () {
@ -35,4 +35,4 @@
Object.defineProperty(exports, '__esModule', { value: true });
}));
})));

4
test/form/erroneous-nested-member-expression/_expected/umd.js

@ -2,7 +2,7 @@
typeof exports === 'object' && typeof module !== 'undefined' ? factory() :
typeof define === 'function' && define.amd ? define(factory) :
(factory());
}(this, function () { 'use strict';
}(this, (function () { 'use strict';
function yar() {
return {
@ -14,4 +14,4 @@
yar.har();
}));
})));

4
test/form/exclude-unnecessary-modifications/_expected/umd.js

@ -2,7 +2,7 @@
typeof exports === 'object' && typeof module !== 'undefined' ? factory() :
typeof define === 'function' && define.amd ? define(factory) :
(factory());
}(this, function () { 'use strict';
}(this, (function () { 'use strict';
var foo = {};
@ -29,4 +29,4 @@
console.log( foo );
}));
})));

4
test/form/export-all-from-internal/_expected/umd.js

@ -2,7 +2,7 @@
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
typeof define === 'function' && define.amd ? define(['exports'], factory) :
(factory((global.exposedInternals = global.exposedInternals || {})));
}(this, function (exports) { 'use strict';
}(this, (function (exports) { 'use strict';
const a = 1;
const b = 2;
@ -12,4 +12,4 @@
Object.defineProperty(exports, '__esModule', { value: true });
}));
})));

4
test/form/export-default-2/_expected/umd.js

@ -2,10 +2,10 @@
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
typeof define === 'function' && define.amd ? define(factory) :
(global.myBundle = factory());
}(this, function () { 'use strict';
}(this, (function () { 'use strict';
var bar = 1;
return bar;
}));
})));

4
test/form/export-default-3/_expected/umd.js

@ -2,10 +2,10 @@
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
typeof define === 'function' && define.amd ? define(factory) :
(global.myBundle = factory());
}(this, function () { 'use strict';
}(this, (function () { 'use strict';
var bar = 1;
return bar;
}));
})));

4
test/form/export-default-import/_expected/umd.js

@ -2,7 +2,7 @@
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('x')) :
typeof define === 'function' && define.amd ? define(['exports', 'x'], factory) :
(factory((global.myBundle = global.myBundle || {}),global.x));
}(this, function (exports,x) { 'use strict';
}(this, (function (exports,x) { 'use strict';
x = 'default' in x ? x['default'] : x;
@ -12,4 +12,4 @@
Object.defineProperty(exports, '__esModule', { value: true });
}));
})));

4
test/form/export-default/_expected/umd.js

@ -2,10 +2,10 @@
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
typeof define === 'function' && define.amd ? define(factory) :
(global.myBundle = factory());
}(this, function () { 'use strict';
}(this, (function () { 'use strict';
var main = 42;
return main;
}));
})));

4
test/form/export-multiple-vars/_expected/umd.js

@ -2,7 +2,7 @@
typeof exports === 'object' && typeof module !== 'undefined' ? factory() :
typeof define === 'function' && define.amd ? define(factory) :
(factory());
}(this, function () { 'use strict';
}(this, (function () { 'use strict';
var a = 1;
@ -14,4 +14,4 @@
assert.equal( e, 5 );
assert.equal( i, 9 );
}));
})));

4
test/form/exports-at-end-if-possible/_expected/umd.js

@ -2,7 +2,7 @@
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
typeof define === 'function' && define.amd ? define(['exports'], factory) :
(factory((global.myBundle = global.myBundle || {})));
}(this, function (exports) { 'use strict';
}(this, (function (exports) { 'use strict';
var FOO = 'foo';
@ -14,4 +14,4 @@
Object.defineProperty(exports, '__esModule', { value: true });
}));
})));

4
test/form/external-import-alias-shadow/_expected/umd.js

@ -2,7 +2,7 @@
typeof exports === 'object' && typeof module !== 'undefined' ? factory(require('acorn')) :
typeof define === 'function' && define.amd ? define(['acorn'], factory) :
(factory(global.acorn));
}(this, function (acorn) { 'use strict';
}(this, (function (acorn) { 'use strict';
function parse$1(source) {
return acorn.parse(source, { ecmaVersion: 6 });
@ -10,4 +10,4 @@
console.log(parse$1('foo'));
}));
})));

4
test/form/external-imports-custom-names-function/_expected/umd.js

@ -2,8 +2,8 @@
typeof exports === 'object' && typeof module !== 'undefined' ? factory(require('a-b-c')) :
typeof define === 'function' && define.amd ? define(['a-b-c'], factory) :
(factory(global.a_b_c));
}(this, function (aBC) { 'use strict';
}(this, (function (aBC) { 'use strict';
aBC.foo();
}));
})));

4
test/form/external-imports-custom-names/_expected/umd.js

@ -2,7 +2,7 @@
typeof exports === 'object' && typeof module !== 'undefined' ? factory(require('jquery')) :
typeof define === 'function' && define.amd ? define(['jquery'], factory) :
(factory(global.jQuery));
}(this, function ($) { 'use strict';
}(this, (function ($) { 'use strict';
$ = 'default' in $ ? $['default'] : $;
@ -10,4 +10,4 @@
$( 'body' ).html( '<h1>hello world!</h1>' );
});
}));
})));

4
test/form/external-imports/_expected/umd.js

@ -2,7 +2,7 @@
typeof exports === 'object' && typeof module !== 'undefined' ? factory(require('factory'), require('baz'), require('shipping-port'), require('alphabet')) :
typeof define === 'function' && define.amd ? define(['factory', 'baz', 'shipping-port', 'alphabet'], factory) :
(factory(global.factory,global.baz,global.containers,global.alphabet));
}(this, function (factory,baz,containers,alphabet) { 'use strict';
}(this, (function (factory,baz,containers,alphabet) { 'use strict';
factory = 'default' in factory ? factory['default'] : factory;
var alphabet__default = 'default' in alphabet ? alphabet['default'] : alphabet;
@ -13,4 +13,4 @@
console.log( alphabet.a );
console.log( alphabet__default.length );
}));
})));

4
test/form/import-external-namespace-and-default/_expected/umd.js

@ -2,7 +2,7 @@
typeof exports === 'object' && typeof module !== 'undefined' ? factory(require('foo')) :
typeof define === 'function' && define.amd ? define(['foo'], factory) :
(factory(global.foo));
}(this, function (foo) { 'use strict';
}(this, (function (foo) { 'use strict';
var foo__default = foo['default'];
@ -10,4 +10,4 @@
console.log( foo__default );
}));
})));

4
test/form/import-named-exported-global-with-alias/_expected/umd.js

@ -2,8 +2,8 @@
typeof exports === 'object' && typeof module !== 'undefined' ? factory() :
typeof define === 'function' && define.amd ? define(factory) :
(factory());
}(this, function () { 'use strict';
}(this, (function () { 'use strict';
}));
})));

4
test/form/indent-false/_expected/umd.js

@ -2,7 +2,7 @@
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
typeof define === 'function' && define.amd ? define(factory) :
(global.foo = factory());
}(this, function () { 'use strict';
}(this, (function () { 'use strict';
function foo () {
console.log( 'indented with tabs' );
@ -10,4 +10,4 @@ function foo () {
return foo;
}));
})));

4
test/form/indent-true-spaces/_expected/umd.js

@ -2,7 +2,7 @@
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
typeof define === 'function' && define.amd ? define(factory) :
(global.foo = factory());
}(this, function () { 'use strict';
}(this, (function () { 'use strict';
function foo () {
console.log( 'indented with spaces' );
@ -10,4 +10,4 @@
return foo;
}));
})));

4
test/form/indent-true/_expected/umd.js

@ -2,7 +2,7 @@
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
typeof define === 'function' && define.amd ? define(factory) :
(global.foo = factory());
}(this, function () { 'use strict';
}(this, (function () { 'use strict';
function foo () {
console.log( 'indented with tabs' );
@ -10,4 +10,4 @@
return foo;
}));
})));

4
test/form/internal-conflict-resolution/_expected/umd.js

@ -2,7 +2,7 @@
typeof exports === 'object' && typeof module !== 'undefined' ? factory() :
typeof define === 'function' && define.amd ? define(factory) :
(factory());
}(this, function () { 'use strict';
}(this, (function () { 'use strict';
var bar$1 = 42;
@ -16,4 +16,4 @@
bar();
}));
})));

4
test/form/intro-and-outro/_expected/umd.js

@ -2,10 +2,10 @@
typeof exports === 'object' && typeof module !== 'undefined' ? factory() :
typeof define === 'function' && define.amd ? define(factory) :
(factory());
}(this, function () { 'use strict';
}(this, (function () { 'use strict';
/* this is an intro */
console.log( 'hello world' );
/* this is an outro */
}));
})));

4
test/form/multiple-exports/_expected/umd.js

@ -2,7 +2,7 @@
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
typeof define === 'function' && define.amd ? define(['exports'], factory) :
(factory((global.myBundle = global.myBundle || {})));
}(this, function (exports) { 'use strict';
}(this, (function (exports) { 'use strict';
var foo = 1;
var bar = 2;
@ -12,4 +12,4 @@
Object.defineProperty(exports, '__esModule', { value: true });
}));
})));

4
test/form/namespace-optimization-b/_expected/umd.js

@ -2,7 +2,7 @@
typeof exports === 'object' && typeof module !== 'undefined' ? factory() :
typeof define === 'function' && define.amd ? define(factory) :
(factory());
}(this, function () { 'use strict';
}(this, (function () { 'use strict';
function foo () {
console.log( 'foo' );
@ -20,4 +20,4 @@
a();
}));
})));

4
test/form/namespace-optimization/_expected/umd.js

@ -2,10 +2,10 @@
typeof exports === 'object' && typeof module !== 'undefined' ? factory() :
typeof define === 'function' && define.amd ? define(factory) :
(factory());
}(this, function () { 'use strict';
}(this, (function () { 'use strict';
function a () {}
a();
}));
})));

4
test/form/namespaced-default-exports/_expected/umd.js

@ -2,10 +2,10 @@
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
typeof define === 'function' && define.amd ? define(factory) :
(global.foo = global.foo || {}, global.foo.bar = global.foo.bar || {}, global.foo.bar.baz = factory());
}(this, function () { 'use strict';
}(this, (function () { 'use strict';
var main = 42;
return main;
}));
})));

4
test/form/namespaced-named-exports/_expected/umd.js

@ -2,7 +2,7 @@
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
typeof define === 'function' && define.amd ? define(['exports'], factory) :
(factory((global.foo = global.foo || {}, global.foo.bar = global.foo.bar || {}, global.foo.bar.baz = global.foo.bar.baz || {})));
}(this, function (exports) { 'use strict';
}(this, (function (exports) { 'use strict';
var answer = 42;
@ -10,4 +10,4 @@
Object.defineProperty(exports, '__esModule', { value: true });
}));
})));

4
test/form/no-imports-or-exports/_expected/umd.js

@ -2,8 +2,8 @@
typeof exports === 'object' && typeof module !== 'undefined' ? factory() :
typeof define === 'function' && define.amd ? define(factory) :
(factory());
}(this, function () { 'use strict';
}(this, (function () { 'use strict';
console.log( 'this is it' );
}));
})));

4
test/form/no-treeshake/_expected/umd.js

@ -2,7 +2,7 @@
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('external')) :
typeof define === 'function' && define.amd ? define(['exports', 'external'], factory) :
(factory((global.stirred = global.stirred || {}),global.external));
}(this, function (exports,external) { 'use strict';
}(this, (function (exports,external) { 'use strict';
var foo = 'unused';
@ -28,4 +28,4 @@
Object.defineProperty(exports, '__esModule', { value: true });
}));
})));

4
test/form/object-destructuring-default-values/_expected/umd.js

@ -2,7 +2,7 @@
typeof exports === 'object' && typeof module !== 'undefined' ? factory() :
typeof define === 'function' && define.amd ? define(factory) :
(factory());
}(this, function () { 'use strict';
}(this, (function () { 'use strict';
const a = 1;
const b = 2;
@ -10,4 +10,4 @@
const [ d = b ] = [];
console.log(c, d);
}));
})));

4
test/form/paths-function/_expected/umd.js

@ -2,10 +2,10 @@
typeof exports === 'object' && typeof module !== 'undefined' ? factory(require('https://npmcdn.com/foo')) :
typeof define === 'function' && define.amd ? define(['https://npmcdn.com/foo'], factory) :
(factory(global.foo));
}(this, function (foo) { 'use strict';
}(this, (function (foo) { 'use strict';
foo = 'default' in foo ? foo['default'] : foo;
assert.equal( foo, 42 );
}));
})));

4
test/form/paths-relative/_expected/umd.js

@ -2,10 +2,10 @@
typeof exports === 'object' && typeof module !== 'undefined' ? factory(require('../foo')) :
typeof define === 'function' && define.amd ? define(['../foo'], factory) :
(factory(global.foo));
}(this, function (foo) { 'use strict';
}(this, (function (foo) { 'use strict';
foo = 'default' in foo ? foo['default'] : foo;
assert.equal( foo, 42 );
}));
})));

4
test/form/paths/_expected/umd.js

@ -2,10 +2,10 @@
typeof exports === 'object' && typeof module !== 'undefined' ? factory(require('https://npmcdn.com/foo')) :
typeof define === 'function' && define.amd ? define(['https://npmcdn.com/foo'], factory) :
(factory(global.foo));
}(this, function (foo) { 'use strict';
}(this, (function (foo) { 'use strict';
foo = 'default' in foo ? foo['default'] : foo;
assert.equal( foo, 42 );
}));
})));

4
test/form/prefer-const/_expected/umd.js

@ -2,7 +2,7 @@
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('external'), require('other'), require('another')) :
typeof define === 'function' && define.amd ? define(['external', 'other', 'another'], factory) :
(global.myBundle = factory(global.external,global.other,global.another));
}(this, function (external,other,another) { 'use strict';
}(this, (function (external,other,another) { 'use strict';
const a = 1;
const b = 2;
@ -19,4 +19,4 @@
return main;
}));
})));

4
test/form/preserve-debugger/_expected/umd.js

@ -2,10 +2,10 @@
typeof exports === 'object' && typeof module !== 'undefined' ? factory() :
typeof define === 'function' && define.amd ? define(factory) :
(factory());
}(this, function () { 'use strict';
}(this, (function () { 'use strict';
before();
debugger;
after();
}));
})));

4
test/form/preserves-comments-after-imports/_expected/umd.js

@ -2,7 +2,7 @@
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
typeof define === 'function' && define.amd ? define(['exports'], factory) :
(factory((global.myBundle = global.myBundle || {})));
}(this, function (exports) { 'use strict';
}(this, (function (exports) { 'use strict';
/** A comment for a number */
var number = 5;
@ -14,4 +14,4 @@
Object.defineProperty(exports, '__esModule', { value: true });
}));
})));

4
test/form/relative-external-with-global/_expected/umd.js

@ -2,7 +2,7 @@
typeof exports === 'object' && typeof module !== 'undefined' ? factory(require('./lib/throttle.js')) :
typeof define === 'function' && define.amd ? define(['./lib/throttle.js'], factory) :
(factory(global.Lib.throttle));
}(this, function (throttle) { 'use strict';
}(this, (function (throttle) { 'use strict';
throttle = 'default' in throttle ? throttle['default'] : throttle;
@ -12,4 +12,4 @@
window.addEventListener( 'mousemove', throttle );
}));
})));

4
test/form/removes-existing-sourcemap-comments/_expected/umd.js

@ -2,7 +2,7 @@
typeof exports === 'object' && typeof module !== 'undefined' ? factory() :
typeof define === 'function' && define.amd ? define(factory) :
(factory());
}(this, function () { 'use strict';
}(this, (function () { 'use strict';
function foo () {
return 42;
@ -10,4 +10,4 @@
console.log( foo() );
}));
})));

4
test/form/self-contained-bundle/_expected/umd.js

@ -2,7 +2,7 @@
typeof exports === 'object' && typeof module !== 'undefined' ? factory() :
typeof define === 'function' && define.amd ? define(factory) :
(factory());
}(this, function () { 'use strict';
}(this, (function () { 'use strict';
function foo () {
console.log( bar() );
@ -19,4 +19,4 @@
foo();
console.log( 3 );
}));
})));

4
test/form/shorthand-properties/_expected/umd.js

@ -2,7 +2,7 @@
typeof exports === 'object' && typeof module !== 'undefined' ? factory() :
typeof define === 'function' && define.amd ? define(factory) :
(factory());
}(this, function () { 'use strict';
}(this, (function () { 'use strict';
function x () {
return 'foo';
@ -26,4 +26,4 @@
assert.equal( bar.x(), 'bar' );
assert.equal( baz.x(), 'baz' );
}));
})));

4
test/form/side-effect-b/_expected/umd.js

@ -2,10 +2,10 @@
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
typeof define === 'function' && define.amd ? define(factory) :
(global.myBundle = factory());
}(this, function () { 'use strict';
}(this, (function () { 'use strict';
var main = 42;
return main;
}));
})));

4
test/form/side-effect-c/_expected/umd.js

@ -2,10 +2,10 @@
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
typeof define === 'function' && define.amd ? define(factory) :
(global.myBundle = factory());
}(this, function () { 'use strict';
}(this, (function () { 'use strict';
var main = 42;
return main;
}));
})));

4
test/form/side-effect-d/_expected/umd.js

@ -2,10 +2,10 @@
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
typeof define === 'function' && define.amd ? define(factory) :
(global.myBundle = factory());
}(this, function () { 'use strict';
}(this, (function () { 'use strict';
var main = 42;
return main;
}));
})));

4
test/form/side-effect-e/_expected/umd.js

@ -2,7 +2,7 @@
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
typeof define === 'function' && define.amd ? define(factory) :
(global.myBundle = factory());
}(this, function () { 'use strict';
}(this, (function () { 'use strict';
function foo () {
var Object = {
@ -21,4 +21,4 @@
return main;
}));
})));

4
test/form/side-effect-f/_expected/umd.js

@ -2,10 +2,10 @@
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
typeof define === 'function' && define.amd ? define(factory) :
(global.myBundle = factory());
}(this, function () { 'use strict';
}(this, (function () { 'use strict';
var main = 42;
return main;
}));
})));

4
test/form/side-effect-g/_expected/umd.js

@ -2,10 +2,10 @@
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
typeof define === 'function' && define.amd ? define(factory) :
(global.myBundle = factory());
}(this, function () { 'use strict';
}(this, (function () { 'use strict';
var main = 42;
return main;
}));
})));

4
test/form/side-effect-h/_expected/umd.js

@ -2,10 +2,10 @@
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
typeof define === 'function' && define.amd ? define(factory) :
(global.myBundle = factory());
}(this, function () { 'use strict';
}(this, (function () { 'use strict';
var main = 42;
return main;
}));
})));

4
test/form/side-effect-i/_expected/umd.js

@ -2,7 +2,7 @@
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
typeof define === 'function' && define.amd ? define(factory) :
(global.myBundle = factory());
}(this, function () { 'use strict';
}(this, (function () { 'use strict';
if ( !ok ) {
throw new Error( 'this will be included' );
@ -12,4 +12,4 @@
return main;
}));
})));

4
test/form/side-effect-j/_expected/umd.js

@ -2,7 +2,7 @@
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
typeof define === 'function' && define.amd ? define(factory) :
(global.myBundle = factory());
}(this, function () { 'use strict';
}(this, (function () { 'use strict';
var augment;
augment = x => x.augmented = true;
@ -12,4 +12,4 @@
return x;
}));
})));

4
test/form/side-effect-k/_expected/umd.js

@ -2,7 +2,7 @@
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
typeof define === 'function' && define.amd ? define(factory) :
(global.myBundle = factory());
}(this, function () { 'use strict';
}(this, (function () { 'use strict';
function augment ( x ) {
var prop, source;
@ -29,4 +29,4 @@
return x;
}));
})));

4
test/form/side-effect-l/_expected/umd.js

@ -2,8 +2,8 @@
typeof exports === 'object' && typeof module !== 'undefined' ? factory() :
typeof define === 'function' && define.amd ? define(factory) :
(factory());
}(this, function () { 'use strict';
}(this, (function () { 'use strict';
}));
})));

4
test/form/side-effect-m/_expected/umd.js

@ -2,7 +2,7 @@
typeof exports === 'object' && typeof module !== 'undefined' ? factory() :
typeof define === 'function' && define.amd ? define(factory) :
(factory());
}(this, function () { 'use strict';
}(this, (function () { 'use strict';
function odd ( n ) {
return n !== 0 && even( n - 1 );
@ -22,4 +22,4 @@
console.log( counter );
}));
})));

4
test/form/side-effect-n/_expected/umd.js

@ -2,7 +2,7 @@
typeof exports === 'object' && typeof module !== 'undefined' ? factory() :
typeof define === 'function' && define.amd ? define(factory) :
(factory());
}(this, function () { 'use strict';
}(this, (function () { 'use strict';
function foo () {
console.log( 'foo' );
@ -14,4 +14,4 @@
( Math.random() < 0.5 ? foo : bar )();
}));
})));

4
test/form/side-effect-o/_expected/umd.js

@ -2,7 +2,7 @@
typeof exports === 'object' && typeof module !== 'undefined' ? factory() :
typeof define === 'function' && define.amd ? define(factory) :
(factory());
}(this, function () { 'use strict';
}(this, (function () { 'use strict';
function fn () {
return Math.random() < 0.5 ? foo : bar;
@ -18,4 +18,4 @@
fn()();
}));
})));

4
test/form/side-effect/_expected/umd.js

@ -2,10 +2,10 @@
typeof exports === 'object' && typeof module !== 'undefined' ? factory() :
typeof define === 'function' && define.amd ? define(factory) :
(factory());
}(this, function () { 'use strict';
}(this, (function () { 'use strict';
var foo = 42;
assert.equal( foo, 42 );
}));
})));

4
test/form/sourcemaps-external/_expected/umd.js

@ -2,7 +2,7 @@
typeof exports === 'object' && typeof module !== 'undefined' ? factory() :
typeof define === 'function' && define.amd ? define(factory) :
(factory());
}(this, function () { 'use strict';
}(this, (function () { 'use strict';
function foo () {
console.log( 'hello from foo.js' );
@ -17,5 +17,5 @@
foo();
bar();
}));
})));
//# sourceMappingURL=umd.js.map

4
test/form/sourcemaps-inline/_expected/umd.js

@ -2,7 +2,7 @@
typeof exports === 'object' && typeof module !== 'undefined' ? factory() :
typeof define === 'function' && define.amd ? define(factory) :
(factory());
}(this, function () { 'use strict';
}(this, (function () { 'use strict';
function foo () {
console.log( 'hello from foo.js' );
@ -17,5 +17,5 @@
foo();
bar();
}));
})));
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidW1kLmpzIiwic291cmNlcyI6WyIuLi9mb28uanMiLCIuLi9iYXIuanMiLCIuLi9tYWluLmpzIl0sInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCBkZWZhdWx0IGZ1bmN0aW9uIGZvbyAoKSB7XG5cdGNvbnNvbGUubG9nKCAnaGVsbG8gZnJvbSBmb28uanMnICk7XG59XG4iLCJleHBvcnQgZGVmYXVsdCBmdW5jdGlvbiBiYXIgKCkge1xuXHRjb25zb2xlLmxvZyggJ2hlbGxvIGZyb20gYmFyLmpzJyApO1xufVxuIiwiaW1wb3J0IGZvbyBmcm9tICcuL2Zvbyc7XG5pbXBvcnQgYmFyIGZyb20gJy4vYmFyJztcblxuY29uc29sZS5sb2coICdoZWxsbyBmcm9tIG1haW4uanMnICk7XG5cbmZvbygpO1xuYmFyKCk7XG4iXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7O0NBQWUsU0FBUyxHQUFHLElBQUk7QUFDL0IsQ0FBQSxDQUFDLE9BQU8sQ0FBQyxHQUFHLEVBQUUsbUJBQW1CLEVBQUUsQ0FBQztBQUNwQyxDQUFBLENBQUM7O0NDRmMsU0FBUyxHQUFHLElBQUk7QUFDL0IsQ0FBQSxDQUFDLE9BQU8sQ0FBQyxHQUFHLEVBQUUsbUJBQW1CLEVBQUUsQ0FBQztBQUNwQyxDQUFBLENBQUM7O0NDQ0QsT0FBTyxDQUFDLEdBQUcsRUFBRSxvQkFBb0IsRUFBRSxDQUFDOztBQUVwQyxDQUFBLEdBQUcsRUFBRSxDQUFDO0FBQ04sQ0FBQSxHQUFHLEVBQUUsQ0FBQyw7OyJ9

4
test/form/spacing-after-function-with-semicolon/_expected/umd.js

@ -2,10 +2,10 @@
typeof exports === 'object' && typeof module !== 'undefined' ? factory() :
typeof define === 'function' && define.amd ? define(factory) :
(factory());
}(this, function () { 'use strict';
}(this, (function () { 'use strict';
function x () { return 'x' };
assert.equal( x(), 'x' );
}));
})));

4
test/form/string-indentation-b/_expected/umd.js

@ -2,11 +2,11 @@
typeof exports === 'object' && typeof module !== 'undefined' ? factory() :
typeof define === 'function' && define.amd ? define(factory) :
(factory());
}(this, function () { 'use strict';
}(this, (function () { 'use strict';
var a = 'a';
var b = 'b';
assert.equal( a, 'a' );
assert.equal( b, 'b' );
}));
})));

4
test/form/string-indentation/_expected/umd.js

@ -2,7 +2,7 @@
typeof exports === 'object' && typeof module !== 'undefined' ? factory() :
typeof define === 'function' && define.amd ? define(factory) :
(factory());
}(this, function () { 'use strict';
}(this, (function () { 'use strict';
var a = '1\
2';
@ -21,4 +21,4 @@
assert.equal( c, '1\n 2' );
assert.equal( d, '1\n\t2' );
}));
})));

4
test/form/this-is-undefined/_expected/umd.js

@ -2,7 +2,7 @@
typeof exports === 'object' && typeof module !== 'undefined' ? factory() :
typeof define === 'function' && define.amd ? define(factory) :
(factory());
}(this, function () { 'use strict';
}(this, (function () { 'use strict';
const fooContext = {};
@ -22,4 +22,4 @@
// outside a function, `this` is undefined
assert.strictEqual( undefined, undefined );
}));
})));

4
test/form/umd-noconflict/_expected/umd.js

@ -7,7 +7,7 @@
global.FooBar = exports;
exports.noConflict = function() { global.FooBar = current; return exports; };
})();
}(this, function (exports) { 'use strict';
}(this, (function (exports) { 'use strict';
function doThings() {
console.log( 'doing things...' );
@ -23,4 +23,4 @@
Object.defineProperty(exports, '__esModule', { value: true });
}));
})));

4
test/form/unmodified-default-exports-function-argument/_expected/umd.js

@ -2,7 +2,7 @@
typeof exports === 'object' && typeof module !== 'undefined' ? factory() :
typeof define === 'function' && define.amd ? define(factory) :
(factory());
}(this, function () { 'use strict';
}(this, (function () { 'use strict';
var foo = function () {
return 42;
@ -17,4 +17,4 @@
console.log( answer );
}));
})));

4
test/form/unmodified-default-exports/_expected/umd.js

@ -2,7 +2,7 @@
typeof exports === 'object' && typeof module !== 'undefined' ? factory() :
typeof define === 'function' && define.amd ? define(factory) :
(factory());
}(this, function () { 'use strict';
}(this, (function () { 'use strict';
var Foo = function () {
this.isFoo = true;
@ -16,4 +16,4 @@
var foo = new Foo();
}));
})));

4
test/form/unused-default-exports/_expected/umd.js

@ -2,7 +2,7 @@
typeof exports === 'object' && typeof module !== 'undefined' ? factory() :
typeof define === 'function' && define.amd ? define(factory) :
(factory());
}(this, function () { 'use strict';
}(this, (function () { 'use strict';
var foo = { value: 1 };
@ -15,4 +15,4 @@
assert.equal( foo.value, 2 );
}));
})));

4
test/form/whitespace-around-namespace-member-expression/_expected/umd.js

@ -2,7 +2,7 @@
typeof exports === 'object' && typeof module !== 'undefined' ? factory() :
typeof define === 'function' && define.amd ? define(factory) :
(factory());
}(this, function () { 'use strict';
}(this, (function () { 'use strict';
function yar() {
console.log('yar?');
@ -10,4 +10,4 @@
yar();
}));
})));
Loading…
Cancel
Save