Skip to content

Commit

Permalink
Merge pull request #13 from johanbrandhorst/remove-dependency-on-gene…
Browse files Browse the repository at this point in the history
…rated-files

Remove dependency on generated javascript files
  • Loading branch information
johanbrandhorst authored Aug 13, 2017
2 parents b4f8bc9 + ea6ab55 commit 7f84a5b
Show file tree
Hide file tree
Showing 50 changed files with 7,385 additions and 13,673 deletions.
8 changes: 2 additions & 6 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,11 @@ jobs:
working_directory: /go/src/github.com/johanbrandhorst/protobuf
steps:
- checkout
- run:
name: Install webpack
command: |
curl -sL https://deb.nodesource.com/setup_8.x | bash -
apt-get install -y nodejs
npm install -g webpack
- run:
name: Install protoc
command: >
apt-get update
apt-get install -y unzip git wget python3
rm -rf /var/lib/apt/lists/*
Expand Down
19 changes: 19 additions & 0 deletions jspb/errors.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
package jspb

import "github.com/gopherjs/gopherjs/js"

// catchException recovers any JS exceptions and
// stores the error in the parameter
func catchException(err *error) {
e := recover()

if e == nil {
return
}

if e, ok := e.(*js.Error); ok {
*err = e
} else {
panic(e)
}
}
4 changes: 2 additions & 2 deletions jspb/include.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@

package jspb

// JspbPackageIsVersion1 is referenced from generated protocol buffer files
// JspbPackageIsVersion2 is referenced from generated protocol buffer files
// to assert that that code is compatible with this version of the package.
const JspbPackageIsVersion1 = true
const JspbPackageIsVersion2 = true
Loading

0 comments on commit 7f84a5b

Please sign in to comment.