File tree Expand file tree Collapse file tree 2 files changed +5
-16
lines changed Expand file tree Collapse file tree 2 files changed +5
-16
lines changed Original file line number Diff line number Diff line change @@ -119,12 +119,6 @@ module.exports = function() {
119
119
if ( data . html ) {
120
120
data . html = data . html . trim ( ) ;
121
121
}
122
- if ( data . js && data . js . indexOf ( 'import' ) > - 1 ) {
123
- var jsAsModule = "<script type=\"module\">\n" + data . js + "\n</script>" ;
124
- data . html = data . html ? data . html + "\n\n" + jsAsModule : jsAsModule ;
125
- data . js = "" ;
126
- data . editors = "1001" ; // HTML, Result, & Console
127
- }
128
122
if ( data ) {
129
123
cleanCodePenData ( data ) ;
130
124
if ( window . CREATE_CODE_PEN ) {
@@ -143,10 +137,6 @@ module.exports = function() {
143
137
144
138
var jsCode = el . querySelector ( "[data-for=js] code" ) ;
145
139
var jsText = jsCode ? jsCode . textContent . trim ( ) : "" ;
146
- if ( jsText ) {
147
- htmlText += "\n<script type=\"module\">\n" + jsText + "\n</script>" ;
148
- jsText = "" ;
149
- }
150
140
151
141
var cssText = getStylesFromIframe ( el . querySelector ( "iframe" ) ) ;
152
142
Original file line number Diff line number Diff line change @@ -60,17 +60,16 @@ describe("bit-docs-html-codepen-link", function() {
60
60
codePen . click ( ) ;
61
61
} ) ;
62
62
assert . deepEqual ( createCallData , [ {
63
- html : '<my-app></my-app>\n\n<script type="module">\nimport { Component } from "//unpkg.com/can@^5.0.0-pre.1/core.mjs";\nComponent\n</script> ' ,
64
- js : '' ,
63
+ html : '<my-app></my-app>' ,
64
+ js : 'import { Component } from "//unpkg.com/can@^5.0.0-pre.1/core.mjs";\nComponent ' ,
65
65
js_module : true ,
66
- editors : '1001 ' ,
66
+ editors : '1011 ' ,
67
67
css : 'my-app {color: "green";}'
68
68
} ,
69
69
{
70
- html : '<script type="module">\nimport {DefineMap} from "//unpkg.com/can@^5.0.0-pre.1/core.mjs";\nconsole.log( myCounter.count ) //-> 1\n</script>' ,
71
- js : '' ,
70
+ js : 'import {DefineMap} from "//unpkg.com/can@^5.0.0-pre.1/core.mjs";\nconsole.log( myCounter.count ) //-> 1' ,
72
71
js_module : true ,
73
- editors : '1001 '
72
+ editors : '0011 '
74
73
}
75
74
] ) ;
76
75
You can’t perform that action at this time.
0 commit comments