Skip to content

b-ono/gulp-protobufjs

 
 

Repository files navigation

gulp-protobufjs

Downloads

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: (default protobuf) Input format. Can be either protobuf or json
    • target: (default commonjs) Output format. Can be amd, commonjs, js, json or proto.
    • path: Optional path to specify where the base path for the proto imports is.
    • encoding (default utf-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 the target configuration.

License

MIT @ Christoph Brand

About

Protobuf converter utilizing protobufjs for the gulp build system.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 95.6%
  • Protocol Buffer 4.4%