Skip to content

kelwang/gs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 

Repository files navigation

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

About

gopherjs related tools

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages