Lines Matching +full:require +full:- +full:directory
1 Protocol Buffers - Google's data interchange format
6 This directory contains the JavaScript Protocol Buffers runtime library.
10 1. CommonJS-style imports (eg. `var protos = require('my-protos');`)
11 2. Closure-style imports (eg. `goog.require('my.package.MyProto');`)
13 Support for ES6-style imports is not implemented yet. Browsers can
20 `npm install google-protobuf`, or use the files in this directory.
25 npm, but you can download a pre-built binary
27 (look for the `protoc-*.zip` files under **Downloads**).
34 a pre-built binary from [https://github.com/protocolbuffers/protobuf/releases](https://github.com/p…
37 follow the instructions in [the top-level
64 ---------------
69 $ protoc --js_out=library=myproto_libs,binary:. messages.proto base.proto
82 The generated code will also `goog.require()` many types in the core library,
83 and they will require many types in the Google Closure library. So make sure
84 that your `goog.provide()` / `goog.require()` setup can find all of your
85 generated code, the core library `.js` files in this directory, and the
91 goog.require('proto.my.package.MyMessage');
99 ----------------
104 $ protoc --js_out=import_style=commonjs,binary:. messages.proto base.proto
109 `google-protobuf.js`. If you are installing from `npm`, this file should
118 var messages = require('./messages_pb');
122 The `--js_out` flag
123 -------------------
125 The syntax of the `--js_out` flag is:
127 --js_out=[OPTIONS:]output_dir
136 - `--js_out=library=myprotos_lib.js,binary:.`: this contains the options
137 `library=myprotos.lib.js` and `binary` and outputs to the current directory.
139 - `--js_out=import_style=commonjs,binary:protos`: this contains the options
140 `import_style=commonjs` and `binary` and outputs to the directory `protos`.
146 The API is not well-documented yet. Here is a quick example to give you an
153 message.setPhoneNumbers(["800-555-1212", "800-555-0000"]);