Skip to content

Commit 3a95945

Browse files
committed
CLI: Added closure wrapper
1 parent 7445da0 commit 3a95945

17 files changed

+74
-48
lines changed

cli/pbjs.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ exports.main = function main(args, callback) {
9797
" commonjs CommonJS wrapper",
9898
" amd AMD wrapper",
9999
" es6 ES6 wrapper (implies --es6)",
100+
" closure Just a closure adding to protobuf.roots (see -r)",
100101
"",
101102
" -r, --root Specifies an alternative protobuf.roots name.",
102103
"",

cli/wrappers/closure.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
(function($protobuf) {
2+
"use strict";
3+
4+
$OUTPUT;
5+
6+
return $root;
7+
})(protobuf);

dist/light/protobuf.js

Lines changed: 19 additions & 13 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/light/protobuf.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/light/protobuf.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/light/protobuf.min.js.gz

13 Bytes
Binary file not shown.

dist/light/protobuf.min.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/minimal/protobuf.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/minimal/protobuf.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/minimal/protobuf.min.js.gz

0 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)