Skip to content

Front-end for protoc code generator plugins written in Node.js

License

Notifications You must be signed in to change notification settings

seishun/node-protoc-plugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

node-protoc-plugin

Front-end for protoc code generator plugins written in Node.js

This is a Node.js port of plugin.h. It's intended to have the same API, within reason.

Usage

require('protoc-plugin')(generator);

Where generator is an object with the following methods:

generateAll(files, parameter, context)

files is an array of FileDescriptor. A parameter is given as passed on the command line. context is a GeneratorResponseContext. Should return true on success.

getSupportedFeatures()

Should return a bitwise OR of features from the Features enum in plugin.proto. Consider extending CodeGenerator for easier access.

TODO

  1. Proper documentation
  2. Missing API

About

Front-end for protoc code generator plugins written in Node.js

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published