Run from this folder: npm install
to install node modules of protoc.
A project must contain proto.json
file with required paths.
Example:
{
// Path to folder, where proto functions will be located.
// The path is relative to the project
"exportPath": "src/app/core/proto",
// List with paths to each .proto file, which are used in the project.
// The paths are relative to the workspace
"protoList": [
"hasadna/projects/angular-proto-firestore/proto/data.proto",
"startup-os/tools/reviewer/reviewer.proto"
]
}
Run from your project: workspacerun protoc
to generate proto functions. More info
Alternative way, if you need to generate proto functions from outside of project root.
Example: node /path/to/script/protoc.js hasadna/projects/angular-proto-firestore
Supported on Linux and Mac only.