From 9d157e87348fb000c224cfbc9f7bc953d437c1eb Mon Sep 17 00:00:00 2001 From: Dmitri Shuralyov Date: Thu, 18 Jan 2018 11:57:59 -0500 Subject: [PATCH 1/2] README: Clarify {{base}} in gopherjs serve. It might be confusing, so just use the example values and mention that the .js file name comes from the directory name. Hopefully, this is more clear. Updates #408. --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 6ccea51eb..2b336c6be 100644 --- a/README.md +++ b/README.md @@ -35,9 +35,9 @@ For system calls (file system access, etc.), see [this page](https://github.com/ #### gopherjs serve -`gopherjs serve` is a useful command you can use during development. It will start an HTTP server serving on ":8080" by default, and dynamically compile Go packages with GopherJS and serve them. +`gopherjs serve` is a useful command you can use during development. It will start an HTTP server serving on ":8080" by default, then dynamically compile your Go packages with GopherJS and serve them. -For example, navigating to `http://localhost:8080/example.com/user/project/` should compile and run the Go package `example.com/user/project`. The generated JavaScript output will be served at `http://localhost:8080/example.com/user/project/project.js`. If the directory contains `index.html` it will be served, otherwise a minimal `index.html` that includes `` will be provided, causing the JavaScript to be executed. All other static files will be served too. +For example, navigating to `http://localhost:8080/example.com/user/project/` should compile and run the Go package `example.com/user/project`. The generated JavaScript output will be served at `http://localhost:8080/example.com/user/project/project.js` (the .js file name will be equal to the directory name). If the directory contains `index.html` it will be served, otherwise a minimal `index.html` that includes `` will be provided, causing the JavaScript to be executed. All other static files will be served too. Refreshing in the browser will rebuild the served files if needed. Compilation errors will be displayed in terminal, and in browser console. Additionally, it will serve $GOROOT and $GOPATH for sourcemaps. From 2e5562ed9b5dd4ac36852e5ce68f1385144df73c Mon Sep 17 00:00:00 2001 From: Dmitri Shuralyov Date: Thu, 18 Jan 2018 12:01:20 -0500 Subject: [PATCH 2/2] Be more specific: "directory" -> "base directory". "base directory" is a pretty general term, and hopefully it's understandable to everyone from the context. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 2b336c6be..b10362e83 100644 --- a/README.md +++ b/README.md @@ -37,7 +37,7 @@ For system calls (file system access, etc.), see [this page](https://github.com/ `gopherjs serve` is a useful command you can use during development. It will start an HTTP server serving on ":8080" by default, then dynamically compile your Go packages with GopherJS and serve them. -For example, navigating to `http://localhost:8080/example.com/user/project/` should compile and run the Go package `example.com/user/project`. The generated JavaScript output will be served at `http://localhost:8080/example.com/user/project/project.js` (the .js file name will be equal to the directory name). If the directory contains `index.html` it will be served, otherwise a minimal `index.html` that includes `` will be provided, causing the JavaScript to be executed. All other static files will be served too. +For example, navigating to `http://localhost:8080/example.com/user/project/` should compile and run the Go package `example.com/user/project`. The generated JavaScript output will be served at `http://localhost:8080/example.com/user/project/project.js` (the .js file name will be equal to the base directory name). If the directory contains `index.html` it will be served, otherwise a minimal `index.html` that includes `` will be provided, causing the JavaScript to be executed. All other static files will be served too. Refreshing in the browser will rebuild the served files if needed. Compilation errors will be displayed in terminal, and in browser console. Additionally, it will serve $GOROOT and $GOPATH for sourcemaps.