diff options
author | dylanetaft <dylanetaft@gmail.com> | 2017-07-15 01:52:07 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-07-15 01:52:07 -0400 |
commit | 36fcc2a5d862742a83ee5c01c05c6be620d294b0 (patch) | |
tree | 9480eb9c6e988b5f9298b073d96aaf6a20ea66a8 /js/README.md | |
parent | c78dbd7c895b8c80cd2f2401d73acf890edf82c6 (diff) | |
download | protobuf-36fcc2a5d862742a83ee5c01c05c6be620d294b0.tar.gz protobuf-36fcc2a5d862742a83ee5c01c05c6be620d294b0.tar.bz2 protobuf-36fcc2a5d862742a83ee5c01c05c6be620d294b0.zip |
Expand documentation in Readme.md
Add some supporting documentation regarding Closure for those unfamiliar., Also substantiate details for "files in this directory" - including them all will result in a project that does not compile as some are used for test cases and aren't part of the core library.
Diffstat (limited to 'js/README.md')
-rw-r--r-- | js/README.md | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/js/README.md b/js/README.md index f4184621..24386dc7 100644 --- a/js/README.md +++ b/js/README.md @@ -19,7 +19,9 @@ resolve imports at compile time. To use Protocol Buffers with JavaScript, you need two main components: 1. The protobuf runtime library. You can install this with - `npm install google-protobuf`, or use the files in this directory. + `npm install google-protobuf`, or use the files in this directory. + If npm is not being used, as of 3.3.0, the files needed are located in binary subdirectory; + arith.js, constants.js, decoder.js, encoder.js, map.js, message.js, reader.js, utils.js, writer.js 2. The Protocol Compiler `protoc`. This translates `.proto` files into `.js` files. The compiler is not currently available via npm, but you can download a pre-built binary @@ -93,6 +95,12 @@ statements like: var message = proto.my.package.MyMessage(); +If unfamiliar with Closure or it's compiler, consider reviewing Closure documentation +https://developers.google.com/closure/library/docs/tutorial +https://developers.google.com/closure/library/docs/closurebuilder +https://developers.google.com/closure/library/docs/depswriter +At a high level, closurebuilder.py can walk dependencies, and compile your code, and all dependencies for Protobuf into a single .js file. Using depsbuilder.py to generate a dependency file can also be considered for non-production dev environments. + CommonJS imports ---------------- |