Browse Source

Style iife

Style iife

Style iife

Style iife

Style iife

del log

Delete npm-debug.log
gh-438-b
mnater 9 years ago
parent
commit
318481f2f0
  1. 9
      src/finalisers/iife.js
  2. 5
      test/cli/banner-intro-outro-footer/_expected.js
  3. 5
      test/form/banner-and-footer-plugin/_expected/iife.js
  4. 5
      test/form/banner-and-footer/_expected/iife.js
  5. 5
      test/form/block-comments/_expected/iife.js
  6. 5
      test/form/dedupes-external-imports/_expected/iife.js
  7. 5
      test/form/exclude-unnecessary-modifications/_expected/iife.js
  8. 5
      test/form/export-all-from-internal/_expected/iife.js
  9. 5
      test/form/export-default-2/_expected/iife.js
  10. 5
      test/form/export-default-3/_expected/iife.js
  11. 5
      test/form/export-default/_expected/iife.js
  12. 5
      test/form/export-multiple-vars/_expected/iife.js
  13. 5
      test/form/exports-at-end-if-possible/_expected/iife.js
  14. 5
      test/form/external-imports-custom-names-function/_expected/iife.js
  15. 5
      test/form/external-imports-custom-names/_expected/iife.js
  16. 5
      test/form/external-imports/_expected/iife.js
  17. 5
      test/form/indent-false/_expected/iife.js
  18. 5
      test/form/indent-true-spaces/_expected/iife.js
  19. 5
      test/form/indent-true/_expected/iife.js
  20. 5
      test/form/internal-conflict-resolution/_expected/iife.js
  21. 5
      test/form/intro-and-outro/_expected/iife.js
  22. 5
      test/form/multiple-exports/_expected/iife.js
  23. 5
      test/form/namespace-optimization-b/_expected/iife.js
  24. 5
      test/form/namespace-optimization/_expected/iife.js
  25. 5
      test/form/namespaced-default-exports/_expected/iife.js
  26. 5
      test/form/namespaced-named-exports/_expected/iife.js
  27. 5
      test/form/no-imports-or-exports/_expected/iife.js
  28. 5
      test/form/object-destructuring-default-values/_expected/iife.js
  29. 5
      test/form/preserves-comments-after-imports/_expected/iife.js
  30. 5
      test/form/removes-existing-sourcemap-comments/_expected/iife.js
  31. 5
      test/form/self-contained-bundle/_expected/iife.js
  32. 5
      test/form/shorthand-properties/_expected/iife.js
  33. 5
      test/form/side-effect-b/_expected/iife.js
  34. 5
      test/form/side-effect-c/_expected/iife.js
  35. 5
      test/form/side-effect-d/_expected/iife.js
  36. 5
      test/form/side-effect-e/_expected/iife.js
  37. 5
      test/form/side-effect-f/_expected/iife.js
  38. 5
      test/form/side-effect-g/_expected/iife.js
  39. 5
      test/form/side-effect-h/_expected/iife.js
  40. 5
      test/form/side-effect-i/_expected/iife.js
  41. 5
      test/form/side-effect-j/_expected/iife.js
  42. 5
      test/form/side-effect-k/_expected/iife.js
  43. 5
      test/form/side-effect-l/_expected/iife.js
  44. 5
      test/form/side-effect-m/_expected/iife.js
  45. 5
      test/form/side-effect/_expected/iife.js
  46. 7
      test/form/sourcemaps-inline/_expected/iife.js
  47. 5
      test/form/sourcemaps/_expected/iife.js
  48. 2
      test/form/sourcemaps/_expected/iife.js.map
  49. 5
      test/form/spacing-after-function-with-semicolon/_expected/iife.js
  50. 5
      test/form/string-indentation-b/_expected/iife.js
  51. 5
      test/form/string-indentation/_expected/iife.js
  52. 5
      test/form/unmodified-default-exports-function-argument/_expected/iife.js
  53. 5
      test/form/unmodified-default-exports/_expected/iife.js
  54. 5
      test/form/unused-default-exports/_expected/iife.js

9
src/finalisers/iife.js

@ -35,9 +35,10 @@ export default function iife ( bundle, magicString, { exportMode, indentString }
args.unshift( 'exports' );
}
const useStrict = options.useStrict !== false ? ` 'use strict';` : ``;
let intro = `(function (${args}) {${useStrict}\n\n`;
let outro = `\n\n})(${dependencies});`;
const useStrict = options.useStrict !== false ? `'use strict';` : ``;
let intro = `(function (${args}) {\n`;
let outro = `\n\n}(${dependencies}));`;
if ( exportMode === 'default' ) {
intro = ( isNamespaced ? `this.` : `var ` ) + `${name} = ${intro}`;
@ -50,7 +51,7 @@ export default function iife ( bundle, magicString, { exportMode, indentString }
// var foo__default = 'default' in foo ? foo['default'] : foo;
const interopBlock = getInteropBlock( bundle );
if ( interopBlock ) magicString.prepend( interopBlock + '\n\n' );
if ( useStrict ) magicString.prepend( useStrict + '\n\n' );
const exportBlock = getExportBlock( bundle.entryModule, exportMode );
if ( exportBlock ) magicString.append( '\n\n' + exportBlock );

5
test/cli/banner-intro-outro-footer/_expected.js

@ -1,9 +1,10 @@
// banner
(function () { 'use strict';
(function () {
'use strict';
// intro
console.log( 42 );
// outro
})();
}());
// footer

5
test/form/banner-and-footer-plugin/_expected/iife.js

@ -1,9 +1,10 @@
/* first banner */
/* second banner */
(function () { 'use strict';
(function () {
'use strict';
console.log( 1 + 1 );
})();
}());
/* first footer */
/* second footer */

5
test/form/banner-and-footer/_expected/iife.js

@ -1,7 +1,8 @@
/* this is a banner */
(function () { 'use strict';
(function () {
'use strict';
console.log( 'hello world' );
})();
}());
/* this is a footer */

5
test/form/block-comments/_expected/iife.js

@ -1,4 +1,5 @@
(function () { 'use strict';
(function () {
'use strict';
function foo () {
return embiggen( 6, 7 );
@ -16,4 +17,4 @@
alert( foo() );
})();
}());

5
test/form/dedupes-external-imports/_expected/iife.js

@ -1,4 +1,5 @@
(function (exports,external) { 'use strict';
(function (exports,external) {
'use strict';
class Foo extends external.Component {
constructor () {
@ -29,4 +30,4 @@
exports.bar = bar;
exports.baz = baz;
})((this.myBundle = {}),external);
}((this.myBundle = {}),external));

5
test/form/exclude-unnecessary-modifications/_expected/iife.js

@ -1,4 +1,5 @@
(function () { 'use strict';
(function () {
'use strict';
var foo = {};
@ -25,4 +26,4 @@
console.log( foo );
})();
}());

5
test/form/export-all-from-internal/_expected/iife.js

@ -1,4 +1,5 @@
(function (exports) { 'use strict';
(function (exports) {
'use strict';
const a = 1;
const b = 2;
@ -6,4 +7,4 @@
exports.a = a;
exports.b = b;
})((this.exposedInternals = {}));
}((this.exposedInternals = {})));

5
test/form/export-default-2/_expected/iife.js

@ -1,7 +1,8 @@
var myBundle = (function () { 'use strict';
var myBundle = (function () {
'use strict';
var bar = 1;
return bar;
})();
}());

5
test/form/export-default-3/_expected/iife.js

@ -1,7 +1,8 @@
var myBundle = (function () { 'use strict';
var myBundle = (function () {
'use strict';
var bar = 1;
return bar;
})();
}());

5
test/form/export-default/_expected/iife.js

@ -1,7 +1,8 @@
var myBundle = (function () { 'use strict';
var myBundle = (function () {
'use strict';
var main = 42;
return main;
})();
}());

5
test/form/export-multiple-vars/_expected/iife.js

@ -1,4 +1,5 @@
(function () { 'use strict';
(function () {
'use strict';
var a = 1;
@ -10,4 +11,4 @@
assert.equal( e, 5 );
assert.equal( i, 9 );
})();
}());

5
test/form/exports-at-end-if-possible/_expected/iife.js

@ -1,4 +1,5 @@
(function (exports) { 'use strict';
(function (exports) {
'use strict';
var FOO = 'foo';
@ -8,4 +9,4 @@
exports.FOO = FOO;
})((this.myBundle = {}));
}((this.myBundle = {})));

5
test/form/external-imports-custom-names-function/_expected/iife.js

@ -1,5 +1,6 @@
(function (aBC) { 'use strict';
(function (aBC) {
'use strict';
aBC.foo();
})(a_b_c);
}(a_b_c));

5
test/form/external-imports-custom-names/_expected/iife.js

@ -1,4 +1,5 @@
(function ($) { 'use strict';
(function ($) {
'use strict';
$ = 'default' in $ ? $['default'] : $;
@ -6,4 +7,4 @@
$( 'body' ).html( '<h1>hello world!</h1>' );
});
})(jQuery);
}(jQuery));

5
test/form/external-imports/_expected/iife.js

@ -1,4 +1,5 @@
(function (factory,baz,containers,alphabet) { 'use strict';
(function (factory,baz,containers,alphabet) {
'use strict';
factory = 'default' in factory ? factory['default'] : factory;
var alphabet__default = 'default' in alphabet ? alphabet['default'] : alphabet;
@ -9,4 +10,4 @@
console.log( alphabet.a );
console.log( alphabet__default.length );
})(factory,baz,containers,alphabet);
}(factory,baz,containers,alphabet));

5
test/form/indent-false/_expected/iife.js

@ -1,4 +1,5 @@
var foo = (function () { 'use strict';
var foo = (function () {
'use strict';
function foo () {
console.log( 'indented with tabs' );
@ -6,4 +7,4 @@ function foo () {
return foo;
})();
}());

5
test/form/indent-true-spaces/_expected/iife.js

@ -1,4 +1,5 @@
var foo = (function () { 'use strict';
var foo = (function () {
'use strict';
function foo () {
console.log( 'indented with spaces' );
@ -6,4 +7,4 @@ var foo = (function () { 'use strict';
return foo;
})();
}());

5
test/form/indent-true/_expected/iife.js

@ -1,4 +1,5 @@
var foo = (function () { 'use strict';
var foo = (function () {
'use strict';
function foo () {
console.log( 'indented with tabs' );
@ -6,4 +7,4 @@ var foo = (function () { 'use strict';
return foo;
})();
}());

5
test/form/internal-conflict-resolution/_expected/iife.js

@ -1,4 +1,5 @@
(function () { 'use strict';
(function () {
'use strict';
var bar$1 = 42;
@ -12,4 +13,4 @@
bar();
})();
}());

5
test/form/intro-and-outro/_expected/iife.js

@ -1,7 +1,8 @@
(function () { 'use strict';
(function () {
'use strict';
/* this is an intro */
console.log( 'hello world' );
/* this is an outro */
})();
}());

5
test/form/multiple-exports/_expected/iife.js

@ -1,4 +1,5 @@
(function (exports) { 'use strict';
(function (exports) {
'use strict';
var foo = 1;
var bar = 2;
@ -6,4 +7,4 @@
exports.foo = foo;
exports.bar = bar;
})((this.myBundle = {}));
}((this.myBundle = {})));

5
test/form/namespace-optimization-b/_expected/iife.js

@ -1,4 +1,5 @@
(function () { 'use strict';
(function () {
'use strict';
function foo () {
console.log( 'foo' );
@ -16,4 +17,4 @@
a();
})();
}());

5
test/form/namespace-optimization/_expected/iife.js

@ -1,7 +1,8 @@
(function () { 'use strict';
(function () {
'use strict';
function a () {}
a();
})();
}());

5
test/form/namespaced-default-exports/_expected/iife.js

@ -1,9 +1,10 @@
this.foo = this.foo || {};
this.foo.bar = this.foo.bar || {};
this.foo.bar.baz = (function () { 'use strict';
this.foo.bar.baz = (function () {
'use strict';
var main = 42;
return main;
})();
}());

5
test/form/namespaced-named-exports/_expected/iife.js

@ -1,9 +1,10 @@
this.foo = this.foo || {};
this.foo.bar = this.foo.bar || {};
(function (exports) { 'use strict';
(function (exports) {
'use strict';
var answer = 42;
exports.answer = answer;
})((this.foo.bar.baz = {}));
}((this.foo.bar.baz = {})));

5
test/form/no-imports-or-exports/_expected/iife.js

@ -1,5 +1,6 @@
(function () { 'use strict';
(function () {
'use strict';
console.log( 'this is it' );
})();
}());

5
test/form/object-destructuring-default-values/_expected/iife.js

@ -1,4 +1,5 @@
(function () { 'use strict';
(function () {
'use strict';
const a = 1;
const b = 2;
@ -6,4 +7,4 @@
const [ d = b ] = [];
console.log(c, d);
})();
}());

5
test/form/preserves-comments-after-imports/_expected/iife.js

@ -1,4 +1,5 @@
(function (exports) { 'use strict';
(function (exports) {
'use strict';
/** A comment for a number */
var number = 5;
@ -8,4 +9,4 @@
exports.obj = obj;
})((this.myBundle = {}));
}((this.myBundle = {})));

5
test/form/removes-existing-sourcemap-comments/_expected/iife.js

@ -1,4 +1,5 @@
(function () { 'use strict';
(function () {
'use strict';
function foo () {
return 42;
@ -6,4 +7,4 @@
console.log( foo() );
})();
}());

5
test/form/self-contained-bundle/_expected/iife.js

@ -1,4 +1,5 @@
(function () { 'use strict';
(function () {
'use strict';
function foo () {
console.log( bar() );
@ -15,4 +16,4 @@
foo();
console.log( 3 );
})();
}());

5
test/form/shorthand-properties/_expected/iife.js

@ -1,4 +1,5 @@
(function () { 'use strict';
(function () {
'use strict';
function x () {
return 'foo';
@ -22,4 +23,4 @@
assert.equal( bar.x(), 'bar' );
assert.equal( baz.x(), 'baz' );
})();
}());

5
test/form/side-effect-b/_expected/iife.js

@ -1,7 +1,8 @@
var myBundle = (function () { 'use strict';
var myBundle = (function () {
'use strict';
var main = 42;
return main;
})();
}());

5
test/form/side-effect-c/_expected/iife.js

@ -1,7 +1,8 @@
var myBundle = (function () { 'use strict';
var myBundle = (function () {
'use strict';
var main = 42;
return main;
})();
}());

5
test/form/side-effect-d/_expected/iife.js

@ -1,7 +1,8 @@
var myBundle = (function () { 'use strict';
var myBundle = (function () {
'use strict';
var main = 42;
return main;
})();
}());

5
test/form/side-effect-e/_expected/iife.js

@ -1,4 +1,5 @@
var myBundle = (function () { 'use strict';
var myBundle = (function () {
'use strict';
function foo () {
var Object = {
@ -17,4 +18,4 @@ var myBundle = (function () { 'use strict';
return main;
})();
}());

5
test/form/side-effect-f/_expected/iife.js

@ -1,7 +1,8 @@
var myBundle = (function () { 'use strict';
var myBundle = (function () {
'use strict';
var main = 42;
return main;
})();
}());

5
test/form/side-effect-g/_expected/iife.js

@ -1,7 +1,8 @@
var myBundle = (function () { 'use strict';
var myBundle = (function () {
'use strict';
var main = 42;
return main;
})();
}());

5
test/form/side-effect-h/_expected/iife.js

@ -1,7 +1,8 @@
var myBundle = (function () { 'use strict';
var myBundle = (function () {
'use strict';
var main = 42;
return main;
})();
}());

5
test/form/side-effect-i/_expected/iife.js

@ -1,4 +1,5 @@
var myBundle = (function () { 'use strict';
var myBundle = (function () {
'use strict';
if ( !ok ) {
throw new Error( 'this will be included' );
@ -8,4 +9,4 @@ var myBundle = (function () { 'use strict';
return main;
})();
}());

5
test/form/side-effect-j/_expected/iife.js

@ -1,4 +1,5 @@
var myBundle = (function () { 'use strict';
var myBundle = (function () {
'use strict';
var augment;
augment = x => x.augmented = true;
@ -8,4 +9,4 @@ var myBundle = (function () { 'use strict';
return x;
})();
}());

5
test/form/side-effect-k/_expected/iife.js

@ -1,4 +1,5 @@
var myBundle = (function () { 'use strict';
var myBundle = (function () {
'use strict';
function augment ( x ) {
var prop, source;
@ -25,4 +26,4 @@ var myBundle = (function () { 'use strict';
return x;
})();
}());

5
test/form/side-effect-l/_expected/iife.js

@ -1,5 +1,6 @@
(function () { 'use strict';
(function () {
'use strict';
})();
}());

5
test/form/side-effect-m/_expected/iife.js

@ -1,4 +1,5 @@
(function () { 'use strict';
(function () {
'use strict';
function odd ( n ) {
return n !== 0 && even( n - 1 );
@ -18,4 +19,4 @@
console.log( counter );
})();
}());

5
test/form/side-effect/_expected/iife.js

@ -1,7 +1,8 @@
(function () { 'use strict';
(function () {
'use strict';
var foo = 42;
assert.equal( foo, 42 );
})();
}());

7
test/form/sourcemaps-inline/_expected/iife.js

@ -1,4 +1,5 @@
(function () { 'use strict';
(function () {
'use strict';
function foo () {
console.log( 'hello from foo.js' );
@ -13,5 +14,5 @@
foo();
bar();
})();
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaWlmZS5qcyIsInNvdXJjZXMiOlsiLi4vZm9vLmpzIiwiLi4vYmFyLmpzIiwiLi4vbWFpbi5qcyJdLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgZGVmYXVsdCBmdW5jdGlvbiBmb28gKCkge1xuXHRjb25zb2xlLmxvZyggJ2hlbGxvIGZyb20gZm9vLmpzJyApO1xufVxuIiwiZXhwb3J0IGRlZmF1bHQgZnVuY3Rpb24gYmFyICgpIHtcblx0Y29uc29sZS5sb2coICdoZWxsbyBmcm9tIGJhci5qcycgKTtcbn1cbiIsImltcG9ydCBmb28gZnJvbSAnLi9mb28nO1xuaW1wb3J0IGJhciBmcm9tICcuL2Jhcic7XG5cbmNvbnNvbGUubG9nKCAnaGVsbG8gZnJvbSBtYWluLmpzJyApO1xuXG5mb28oKTtcbmJhcigpO1xuIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7O0NBQWUsU0FBUyxHQUFHLElBQUk7QUFDL0IsQ0FBQSxDQUFDLE9BQU8sQ0FBQyxHQUFHLEVBQUUsbUJBQW1CLEVBQUUsQ0FBQztBQUNwQyxDQUFBLENBQUM7O0NDRmMsU0FBUyxHQUFHLElBQUk7QUFDL0IsQ0FBQSxDQUFDLE9BQU8sQ0FBQyxHQUFHLEVBQUUsbUJBQW1CLEVBQUUsQ0FBQztBQUNwQyxDQUFBLENBQUM7O0NDQ0QsT0FBTyxDQUFDLEdBQUcsRUFBRSxvQkFBb0IsRUFBRSxDQUFDOztBQUVwQyxDQUFBLEdBQUcsRUFBRSxDQUFDO0FBQ04sQ0FBQSxHQUFHLEVBQUUsQ0FBQyw7OyJ9
}());
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaWlmZS5qcyIsInNvdXJjZXMiOlsiLi4vZm9vLmpzIiwiLi4vYmFyLmpzIiwiLi4vbWFpbi5qcyJdLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgZGVmYXVsdCBmdW5jdGlvbiBmb28gKCkge1xuXHRjb25zb2xlLmxvZyggJ2hlbGxvIGZyb20gZm9vLmpzJyApO1xufVxuIiwiZXhwb3J0IGRlZmF1bHQgZnVuY3Rpb24gYmFyICgpIHtcblx0Y29uc29sZS5sb2coICdoZWxsbyBmcm9tIGJhci5qcycgKTtcbn1cbiIsImltcG9ydCBmb28gZnJvbSAnLi9mb28nO1xuaW1wb3J0IGJhciBmcm9tICcuL2Jhcic7XG5cbmNvbnNvbGUubG9nKCAnaGVsbG8gZnJvbSBtYWluLmpzJyApO1xuXG5mb28oKTtcbmJhcigpO1xuIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztDQUFlLFNBQVMsR0FBRyxJQUFJO0FBQy9CLENBQUEsQ0FBQyxPQUFPLENBQUMsR0FBRyxFQUFFLG1CQUFtQixFQUFFLENBQUM7QUFDcEMsQ0FBQSxDQUFDOztDQ0ZjLFNBQVMsR0FBRyxJQUFJO0FBQy9CLENBQUEsQ0FBQyxPQUFPLENBQUMsR0FBRyxFQUFFLG1CQUFtQixFQUFFLENBQUM7QUFDcEMsQ0FBQSxDQUFDOztDQ0NELE9BQU8sQ0FBQyxHQUFHLEVBQUUsb0JBQW9CLEVBQUUsQ0FBQzs7QUFFcEMsQ0FBQSxHQUFHLEVBQUUsQ0FBQztBQUNOLENBQUEsR0FBRyxFQUFFLENBQUMsOzsifQ==

5
test/form/sourcemaps/_expected/iife.js

@ -1,4 +1,5 @@
(function () { 'use strict';
(function () {
'use strict';
function foo () {
console.log( 'hello from foo.js' );
@ -13,5 +14,5 @@
foo();
bar();
})();
}());
//# sourceMappingURL=iife.js.map

2
test/form/sourcemaps/_expected/iife.js.map

@ -1 +1 @@
{"version":3,"file":"iife.js","sources":["../foo.js","../bar.js","../main.js"],"sourcesContent":["export default function foo () {\n\tconsole.log( 'hello from foo.js' );\n}\n","export default function bar () {\n\tconsole.log( 'hello from bar.js' );\n}\n","import foo from './foo';\nimport bar from './bar';\n\nconsole.log( 'hello from main.js' );\n\nfoo();\nbar();\n"],"names":[],"mappings":";;CAAe,SAAS,GAAG,IAAI;AAC/B,CAAA,CAAC,OAAO,CAAC,GAAG,EAAE,mBAAmB,EAAE,CAAC;AACpC,CAAA,CAAC;;CCFc,SAAS,GAAG,IAAI;AAC/B,CAAA,CAAC,OAAO,CAAC,GAAG,EAAE,mBAAmB,EAAE,CAAC;AACpC,CAAA,CAAC;;CCCD,OAAO,CAAC,GAAG,EAAE,oBAAoB,EAAE,CAAC;;AAEpC,CAAA,GAAG,EAAE,CAAC;AACN,CAAA,GAAG,EAAE,CAAC,;;"}
{"version":3,"file":"iife.js","sources":["../foo.js","../bar.js","../main.js"],"sourcesContent":["export default function foo () {\n\tconsole.log( 'hello from foo.js' );\n}\n","export default function bar () {\n\tconsole.log( 'hello from bar.js' );\n}\n","import foo from './foo';\nimport bar from './bar';\n\nconsole.log( 'hello from main.js' );\n\nfoo();\nbar();\n"],"names":[],"mappings":";;;CAAe,SAAS,GAAG,IAAI;AAC/B,CAAA,CAAC,OAAO,CAAC,GAAG,EAAE,mBAAmB,EAAE,CAAC;AACpC,CAAA,CAAC;;CCFc,SAAS,GAAG,IAAI;AAC/B,CAAA,CAAC,OAAO,CAAC,GAAG,EAAE,mBAAmB,EAAE,CAAC;AACpC,CAAA,CAAC;;CCCD,OAAO,CAAC,GAAG,EAAE,oBAAoB,EAAE,CAAC;;AAEpC,CAAA,GAAG,EAAE,CAAC;AACN,CAAA,GAAG,EAAE,CAAC,;;"}

5
test/form/spacing-after-function-with-semicolon/_expected/iife.js

@ -1,7 +1,8 @@
(function () { 'use strict';
(function () {
'use strict';
function x () { return 'x' };
assert.equal( x(), 'x' );
})();
}());

5
test/form/string-indentation-b/_expected/iife.js

@ -1,8 +1,9 @@
(function () { 'use strict';
(function () {
'use strict';
var a = 'a';
var b = 'b';
assert.equal( a, 'a' );
assert.equal( b, 'b' );
})();
}());

5
test/form/string-indentation/_expected/iife.js

@ -1,4 +1,5 @@
(function () { 'use strict';
(function () {
'use strict';
var a = '1\
2';
@ -17,4 +18,4 @@
assert.equal( c, '1\n 2' );
assert.equal( d, '1\n\t2' );
})();
}());

5
test/form/unmodified-default-exports-function-argument/_expected/iife.js

@ -1,4 +1,5 @@
(function () { 'use strict';
(function () {
'use strict';
var foo = function () {
return 42;
@ -13,4 +14,4 @@
console.log( answer );
})();
}());

5
test/form/unmodified-default-exports/_expected/iife.js

@ -1,4 +1,5 @@
(function () { 'use strict';
(function () {
'use strict';
var Foo = function () {
this.isFoo = true;
@ -12,4 +13,4 @@
var foo = new Foo();
})();
}());

5
test/form/unused-default-exports/_expected/iife.js

@ -1,4 +1,5 @@
(function () { 'use strict';
(function () {
'use strict';
var foo = { value: 1 };
@ -11,4 +12,4 @@
assert.equal( foo.value, 2 );
})();
}());

Loading…
Cancel
Save