Skip to content

Commit 03f0be2

Browse files
committed
fixed more formatting
1 parent 3e3bb90 commit 03f0be2

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

index.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,11 @@ Nearly everything, including Goroutines ([compatibility table](https://github.co
1414

1515
### Installation and Usage
1616
Get or update GopherJS and dependencies with:
17+
1718
```
1819
go get -u github.com/gopherjs/gopherjs
1920
```
21+
2022
Now you can use `gopherjs build [files]` or `gopherjs install [package]` which behave similar to the `go` tool. For `main` packages, these commands create a `.js` file and `.js.map` source map in the current directory or in `$GOPATH/bin`. The generated JavaScript file can be used as usual in a website. Use `gopherjs help [command]` to get a list of possible command line flags, e.g. for minification and automatically watching for changes. If you want to run the generated code with Node.js, see [this page](https://github.com/gopherjs/gopherjs/blob/master/doc/syscalls.md).
2123

2224
*Note: GopherJS will try to write compiled object files of the core packages to your $GOROOT/pkg directory. If that fails, it will fall back to $GOPATH/pkg.*
@@ -51,6 +53,7 @@ You may also want use the [DOM bindings](http://dominik.honnef.co/go/js/dom), th
5153

5254
#### Providing library functions for use in other JavaScript code
5355
Set a global variable to a map that contains the functions:
56+
5457
```go
5558
package main
5659

@@ -78,6 +81,7 @@ func (p *Pet) SetName(name string) {
7881
p.name = name
7982
}
8083
```
84+
8185
For more details see [Jason Stone's blog post](http://legacytotheedge.blogspot.de/2014/03/gopherjs-go-to-javascript-transpiler.html) about GopherJS.
8286

8387
### Architecture

0 commit comments

Comments
 (0)