example

package module
v0.0.0-...-3654578 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 16, 2020 License: BSD-3-Clause Imports: 0 Imported by: 0

README

Building examples

Vecty fully supports two major Go <-> Web compilers thanks to its minimal dependencies:

  • Go 1.14+ WebAssembly support
  • GopherJS (Go to JavaScript transpiler)

If you are just getting started, we suggest using the Go 1.14+ WebAssembly support.

Go 1.14+ WebAssembly support

Ensure you are running Go 1.14 or higher. Vecty requires Go 1.14+ as it makes use of improvements to the syscall/js package which are not present in earlier versions of Go.

Running examples

The easiest way to run the examples as WebAssembly is via wasmserve.

Install it (using Go 1.14+):

go get -u github.com/hajimehoshi/wasmserve

Then run an example:

cd markdown/
wasmserve

And navigate to http://localhost:8080/

GopherJS

Running examples

Install GopherJS then run an example:

cd markdown
gopherjs serve

And navigate to http://localhost:8080/

TinyGo WebAssembly support

TinyGo WebAssembly support is being actively worked on.

Documentation

Overview

Package example exists as an empty Go module containing all Vecty example dependencies.

It is done such that example dependencies do not end up in downstream go.mod files for users who are just importing Vecty alone.

Directories

Path Synopsis
store/storeutil
Package storeutil contains a ListenerRegistry type.
Package storeutil contains a ListenerRegistry type.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL