-
-
Notifications
You must be signed in to change notification settings - Fork 182
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add svelte viewer. add context to transpiler. add http, import map es…
…build plugins (#402) * add ascii -> html rendering. add context to transpiler. add http, import map esbuild plugins. * added better error handling * add svelte bundling, static rendering, and more tests * bump github.com/livebud/js * run go mod tidy * setup for hot reload * add basic hot reload to example script
- Loading branch information
1 parent
e84c6d6
commit 3f67df9
Showing
37 changed files
with
2,081 additions
and
301 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package terminal | ||
|
||
import ( | ||
"bytes" | ||
_ "embed" | ||
|
||
terminal "github.com/buildkite/terminal-to-html" | ||
) | ||
|
||
// Pre tag | ||
func Pre(data []byte) []byte { | ||
var b bytes.Buffer | ||
b.WriteString(`<pre class="term-container">`) | ||
b.Write(terminal.Render(data)) | ||
b.WriteString(`</pre>`) | ||
return b.Bytes() | ||
} | ||
|
||
//go:embed terminal.css | ||
var css []byte | ||
|
||
// CSS that needs to be rendered | ||
func CSS() []byte { | ||
return css | ||
} |
Oops, something went wrong.