Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Start introducing new blockBindings option
- Loading branch information
1 parent
bc23d49
commit 02e3432
Showing
27 changed files
with
158 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 10 additions & 0 deletions
10
test/form/samples/generated-code/block-bindings-false/_config.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
module.exports = { | ||
description: 'does not use block bindings', | ||
options: { | ||
external: ['external'], | ||
output: { | ||
generatedCode: { arrowFunctions: true, blockBindings: false }, | ||
name: 'bundle' | ||
} | ||
} | ||
}; |
9 changes: 9 additions & 0 deletions
9
test/form/samples/generated-code/block-bindings-false/_expected/amd.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
define(['external'], (foo => { 'use strict'; | ||
|
||
var _interopDefaultLegacy = e => e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; | ||
|
||
var foo__default = /*#__PURE__*/_interopDefaultLegacy(foo); | ||
|
||
console.log(foo__default["default"]); | ||
|
||
})); |
9 changes: 9 additions & 0 deletions
9
test/form/samples/generated-code/block-bindings-false/_expected/cjs.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
'use strict'; | ||
|
||
var foo = require('external'); | ||
|
||
var _interopDefaultLegacy = e => e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; | ||
|
||
var foo__default = /*#__PURE__*/_interopDefaultLegacy(foo); | ||
|
||
console.log(foo__default["default"]); |
3 changes: 3 additions & 0 deletions
3
test/form/samples/generated-code/block-bindings-false/_expected/es.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import foo from 'external'; | ||
|
||
console.log(foo); |
10 changes: 10 additions & 0 deletions
10
test/form/samples/generated-code/block-bindings-false/_expected/iife.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
(foo => { | ||
'use strict'; | ||
|
||
var _interopDefaultLegacy = e => e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; | ||
|
||
var foo__default = /*#__PURE__*/_interopDefaultLegacy(foo); | ||
|
||
console.log(foo__default["default"]); | ||
|
||
})(foo); |
14 changes: 14 additions & 0 deletions
14
test/form/samples/generated-code/block-bindings-false/_expected/system.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
System.register('bundle', ['external'], (() => { | ||
'use strict'; | ||
var foo; | ||
return { | ||
setters: [(module => { | ||
foo = module["default"]; | ||
})], | ||
execute: (() => { | ||
|
||
console.log(foo); | ||
|
||
}) | ||
}; | ||
})); |
13 changes: 13 additions & 0 deletions
13
test/form/samples/generated-code/block-bindings-false/_expected/umd.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
((global, factory) => { | ||
typeof exports === 'object' && typeof module !== 'undefined' ? factory(require('external')) : | ||
typeof define === 'function' && define.amd ? define(['external'], factory) : | ||
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.foo)); | ||
})(this, (foo => { 'use strict'; | ||
|
||
var _interopDefaultLegacy = e => e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; | ||
|
||
var foo__default = /*#__PURE__*/_interopDefaultLegacy(foo); | ||
|
||
console.log(foo__default["default"]); | ||
|
||
})); |
2 changes: 2 additions & 0 deletions
2
test/form/samples/generated-code/block-bindings-false/main.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
import foo from 'external'; | ||
console.log(foo); |
10 changes: 10 additions & 0 deletions
10
test/form/samples/generated-code/block-bindings-true/_config.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
module.exports = { | ||
description: 'uses block bindings', | ||
options: { | ||
external: ['external'], | ||
output: { | ||
generatedCode: { arrowFunctions: true, blockBindings: true }, | ||
name: 'bundle' | ||
} | ||
} | ||
}; |
9 changes: 9 additions & 0 deletions
9
test/form/samples/generated-code/block-bindings-true/_expected/amd.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
define(['external'], (foo => { 'use strict'; | ||
|
||
const _interopDefaultLegacy = e => e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; | ||
|
||
const foo__default = /*#__PURE__*/_interopDefaultLegacy(foo); | ||
|
||
console.log(foo__default["default"]); | ||
|
||
})); |
9 changes: 9 additions & 0 deletions
9
test/form/samples/generated-code/block-bindings-true/_expected/cjs.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
'use strict'; | ||
|
||
const foo = require('external'); | ||
|
||
const _interopDefaultLegacy = e => e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; | ||
|
||
const foo__default = /*#__PURE__*/_interopDefaultLegacy(foo); | ||
|
||
console.log(foo__default["default"]); |
3 changes: 3 additions & 0 deletions
3
test/form/samples/generated-code/block-bindings-true/_expected/es.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import foo from 'external'; | ||
|
||
console.log(foo); |
10 changes: 10 additions & 0 deletions
10
test/form/samples/generated-code/block-bindings-true/_expected/iife.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
(foo => { | ||
'use strict'; | ||
|
||
const _interopDefaultLegacy = e => e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; | ||
|
||
const foo__default = /*#__PURE__*/_interopDefaultLegacy(foo); | ||
|
||
console.log(foo__default["default"]); | ||
|
||
})(foo); |
14 changes: 14 additions & 0 deletions
14
test/form/samples/generated-code/block-bindings-true/_expected/system.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
System.register('bundle', ['external'], (() => { | ||
'use strict'; | ||
var foo; | ||
return { | ||
setters: [(module => { | ||
foo = module["default"]; | ||
})], | ||
execute: (() => { | ||
|
||
console.log(foo); | ||
|
||
}) | ||
}; | ||
})); |
13 changes: 13 additions & 0 deletions
13
test/form/samples/generated-code/block-bindings-true/_expected/umd.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
((global, factory) => { | ||
typeof exports === 'object' && typeof module !== 'undefined' ? factory(require('external')) : | ||
typeof define === 'function' && define.amd ? define(['external'], factory) : | ||
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.foo)); | ||
})(this, (foo => { 'use strict'; | ||
|
||
const _interopDefaultLegacy = e => e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; | ||
|
||
const foo__default = /*#__PURE__*/_interopDefaultLegacy(foo); | ||
|
||
console.log(foo__default["default"]); | ||
|
||
})); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../../generated-code/block-bindings-false/main.js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters