Skip to content

Commit

Permalink
Pool
Browse files Browse the repository at this point in the history
  • Loading branch information
bep committed Jul 26, 2024
1 parent fbea494 commit 0cab941
Show file tree
Hide file tree
Showing 13 changed files with 518 additions and 14,676 deletions.
6 changes: 6 additions & 0 deletions common/hugio/writers.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,12 @@ func ToReadCloser(r io.Reader) io.ReadCloser {
}
}

type ReadWriteCloser interface {
io.Reader
io.Writer
io.Closer
}

// PipeReadWriteCloser is a convenience type to create a pipe with a ReadCloser and a WriteCloser.
type PipeReadWriteCloser struct {
*io.PipeReader
Expand Down
Binary file added internal/ext/.DS_Store
Binary file not shown.
2 changes: 1 addition & 1 deletion internal/ext/build.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
go generate ./gen
javy compile js/greet.bundle.js -d -o wasm/greet.wasm
javy compile js/renderkatex.bundle.js -d -o wasm/renderkatex.wasm
touch wasm_test.go
touch warpc_test.go
14 changes: 9 additions & 5 deletions internal/ext/gen/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,17 @@ func main() {
}

func buildJSBundle(filename string) error {
minify := true
result := api.Build(
api.BuildOptions{
EntryPoints: []string{filename},
Bundle: true,
Target: api.ES2020,
Outfile: strings.Replace(filename, ".js", ".bundle.js", 1),
SourceRoot: "../js",
EntryPoints: []string{filename},
Bundle: true,
MinifyWhitespace: minify,
MinifyIdentifiers: minify,
MinifySyntax: minify,
Target: api.ES2020,
Outfile: strings.Replace(filename, ".js", ".bundle.js", 1),
SourceRoot: "../js",
})

if len(result.Errors) > 0 {
Expand Down
53 changes: 2 additions & 51 deletions internal/ext/js/greet.bundle.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 0cab941

Please sign in to comment.