Skip to content

brunobely/node-protoc

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Protocol Buffers for Node

A wrapper in Node for the compiled protoc from https://github.com/protocolbuffers/protobuf.

Version

It's currently using Protocol Buffers v21.9.

Platforms

Google only provides binary files for Windows, Linux and macOS in aarch64, x86_64 and x86_32.

Examples

There's currently no documentation. Hopefully this example will help.

var protoc = require("protoc");

protoc.library(["path/to/file.proto", "path/to/file2.proto"], function(err, files) {
  if (err) {
    console.error(err);
    return;
  }

  // Handle the JavaScript Vinyl files.
  // These files can be used in Google Closure Compiler,
  // but they require the files in
  // https://github.com/google/protobuf/tree/master/js
  
  // ...
});

It's also possible to directly call the protoc binary file:

npx protoc --help

About

A simple wrapper for the protoc.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%