1.4.1 • Published 8 years ago
gulp-protobufjs-new v1.4.1
gulp-protobufjs
Converts protobuf files utilizing the protobufjs library.
Install
Install with npm.
npm install --save-dev gulp-protobufjs-newExamples
var gulp = require('gulp');
var gulpprotobuf = require('gulp-protobufjs-new');
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 eitherprotobuforjsontarget: (defaultcommonjs) Output format. Can beamd,commonjs,js,jsonorproto.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.extThe file extension which should be set. Is being determined automatically if not given depending on thetargetconfiguration.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