1.3.0 • Published 9 years ago
gulp-protobufjs v1.3.0
gulp-protobufjs
Converts protobuf files utilizing the protobufjs library.
Install
Install with npm.
npm install --save-dev gulp-protobufjs
Examples
var gulp = require('gulp');
var gulpprotobuf = require('gulp-protobufjs');
gulp.task('default', function () {
return gulp.src('file.proto')
.pipe(gulpprotobuf())
.pipe(gulp.dest('out/'));
});
API
gulpprotobuf(options)
options
:input
: (defaultprotobuf
) Input format. Can be eitherprotobuf
orjson
target
: (defaultcommonjs
) Output format. Can beamd
,commonjs
,js
,json
orproto
.path
: Optional path to specify where the base path for the proto imports is.encoding
(defaultutf-8
) Encoding which should be used to parse the input files.ext
The file extension which should be set. Is being determined automatically if not given depending on thetarget
configuration.noErrorReporting
(defaultfalse
) Gulp ignores errors on the console for asynchronous operations. Because of that when an error occurs during processing it will be manually added to the console. If this is not wanted the flag disables it.showStack
(defaultfalse
) Indication if the stack of an error should be printed to console or not. Per default this is off to keep the formatting in the command line clean.
License
MIT @ Christoph Brand