gs

module
v0.0.0-...-641ea48 Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2017 License: MIT

README

gs

gopherjs related tools

Handler is a tool to serve gopherjs at real time best for developer mode

go server

gstool "github.com/kelwang/gs/tool"

... ...

if c.DevMode() {
    gsOpts := &gbuild.Options{CreateMapFile: false}
    mux.Handle("/gs-src/", gstool.Handler("github.com/xxx/mygopherjs/", gsOpts, len("gs-src/")))
}else{
    // serve compiled javascript
    mux.Handle("/js/script/script.js", aStaticHandler)
}

html

   <script src="/gs-src/script/script.js"></script> 

gopherjs folder

/mygopherjs
--/script/main.go

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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