Skip to content

Commit 313ea16

Browse files
committed
removed generated code panel
1 parent de39b38 commit 313ea16

File tree

3 files changed

+1
-30
lines changed

3 files changed

+1
-30
lines changed

playground/index.html

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,17 +14,13 @@
1414
<input type="button" value="Format" ng-click="format()" />
1515
<input type="button" value="Share" ng-click="share()" />
1616
<input type="text" class="show-share-url-{{showShareUrl}}" id="share-url" value="{{shareUrl}}" onfocus="select()" />
17-
<label><input ng-model="showGenerated" type="checkbox" />Show generated code for main package</label>
1817
</span>
1918
</div>
2019

21-
<div class="box show-generated-{{showGenerated}}" id="content">
20+
<div class="box" id="content">
2221
<div class="box yellow" id="input">
2322
<textarea ng-model="code" id="code" autocorrect="off" autocomplete="off" autocapitalize="off" spellcheck="false"></textarea>
2423
</div>
25-
<div class="box yellow" id="generated">
26-
<pre>{{generated}}</pre>
27-
</div>
2824
</div>
2925
<div class="box" id="output">
3026
<pre ng-repeat="line in output" class="{{line.type}}">{{line.content}}&nbsp;</pre>

playground/playground.css

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -44,23 +44,8 @@ a {
4444
display: none;
4545
}
4646

47-
.show-generated-false #generated {
48-
display: none;
49-
}
50-
51-
.show-generated-true #input {
52-
right: 50%;
53-
margin-right: 2px;
54-
}
55-
56-
.show-generated-true #generated {
57-
left: 50%;
58-
margin-left: 2px;
59-
}
60-
6147
#code,
6248
#output,
63-
#generated,
6449
pre,
6550
.lines {
6651
font-family: Menlo, Courier\ New, monospace;
@@ -81,10 +66,6 @@ pre,
8166
wrap: off;
8267
}
8368

84-
#generated {
85-
overflow: scroll;
86-
}
87-
8869
#output {
8970
position: absolute;
9071
overflow: scroll;

playground/playground.go

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,6 @@ func main() {
5757
}
5858
scope.Set("shareUrl", "")
5959
scope.Set("showShareUrl", false)
60-
scope.Set("showGenerated", false)
61-
scope.Set("generated", `(generated code will be shown here after clicking "Run")`)
6260

6361
packages := make(map[string]*compiler.Archive)
6462
var pkgsToLoad []string
@@ -190,10 +188,6 @@ func main() {
190188
return
191189
}
192190

193-
mainPkgCode := bytes.NewBuffer(nil)
194-
compiler.WritePkgCode(packages["main"], false, &compiler.SourceMapFilter{Writer: mainPkgCode})
195-
scope.Set("generated", mainPkgCode.String())
196-
197191
jsCode := bytes.NewBuffer(nil)
198192
jsCode.WriteString("try{\n")
199193
compiler.WriteProgramCode(allPkgs, &compiler.SourceMapFilter{Writer: jsCode})

0 commit comments

Comments
 (0)