node package manager

gulp-protoc

gulp-protoc

Generate (Protocol Buffer)[https://github.com/google/protobuf] source files from Gulp.

Notice: Source is being migrated to a new repository and is temporarily unavailable.

Install

$ npm install --save-dev gulp-protoc

Usage

protoc = require('gulp-protoc');
 
gulp.task('example', function() {
  return gulp.src('./proto/**/*')
    .pipe(protoc('java'))
    .pipe(gulp.dest('gen/proto/java'));
});

API

protoc([languages, [options]])

Generates source files from protocol buffer message definitions.

languages

Type: string or string[]
Default: 'java'

Lists the languages that should be generated. Each file/language combination is built to a different folder, but relative paths may conflict, expecially between languages.

options

protocToolPath

Type: string
Default: protoc on $PATH

Path to the protoc tool. If protoc isn't on your $PATH, set this to the binary's path.

addImports(source)

Adds paths to examine for imports.

source

Type: string or string[] or readable stream of vinyl files Required

Imports to add. If this is a string or string[] it is treated as a glob spec and all files and folders are added. Otherwise all files and folders on the stream are added.

trace

Type: boolean
Default: false

Module-level flag for tracing. Set to true to enable trace output. This is useful when trying to diagnose a problem with compilation, or when developing the library.

License

The MIT License (MIT)

Copyright (c) 2016 Paul Hounshell paul.hounshell@gmail.com

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.