Re: [protobuf] Generated Javascript Protobufs and Grunt

2017-02-21 Thread gunnar . gissel
Thanks for the help, I appreciate it I think it's worth noting, for those that follow in my footsteps, that when you do a GET vs a RESTful endpoint you don't get raw bytes back. The most expedient thing I found (and please set me straight if I'm wrong), was to declare the response type to be

Re: [protobuf] Generated Javascript Protobufs and Grunt

2017-02-21 Thread 'Adam Cozzette' via Protocol Buffers
Ok, that's good you were able to get things working with CommonJS-style imports. To parse the raw bytes into an object you will want to call MyProto.deserializeBinary(bytes). On Wed, Feb 15, 2017 at 3:42 PM, Gunnar Gissel - NOAA Federal < gunnar.gis...@noaa.gov> wrote: > FWIW, switching to

Re: [protobuf] Generated Javascript Protobufs and Grunt

2017-02-15 Thread Gunnar Gissel - NOAA Federal
FWIW, switching to commonjs style imports seems to work. Now I'm wondering how do I get from bytes to objects? Passing the bytes into the generated constructor doesn't seem to work - I'm still seeing binary values where I expect to see textual values On Wed, Feb 15, 2017 at 10:20 AM,

Re: [protobuf] Generated Javascript Protobufs and Grunt

2017-02-15 Thread gunnar . gissel
I don't expect that the code got pulled into the protobuf library because I'm pulling the generated javascript files out of a jar created by maven and using them on a box that has been set up solely for doing the javascript side of things. The protobuf install there is via npm, although I had

Re: [protobuf] Generated Javascript Protobufs and Grunt

2017-02-15 Thread gunnar . gissel
Sure thing! Gruntfile.js: module.exports = function(grunt){ require('google-closure-compiler').grunt(grunt); grunt.initConfig({ pkg: grunt.file.readJSON('package.json'), 'closure-compiler': { my_target: { files: { 'target/full.js': ['js/**.js'] },

Re: [protobuf] Generated Javascript Protobufs and Grunt

2017-02-15 Thread 'Adam Cozzette' via Protocol Buffers
If you could share your gruntfile that would be great. I would be interested to know in particular the protoc command used to generate the Javascript. Also it would be good to verify that the generated code for that proto did not somehow get pulled into the protobuf build and end up being part of

[protobuf] Generated Javascript Protobufs and Grunt

2017-02-15 Thread gunnar . gissel
I've got some javascript generated from protoc and I'm trying to compile all those files together with closure-compiler so I can use them in a client app. I'm using Grunt and closure compiler and can provide my gruntfile and generated javascript if it would help. My problem is that the