Skip to content

Commit

Permalink
Updated README and bundler according to dynamic require calls
Browse files Browse the repository at this point in the history
  • Loading branch information
dcodeIO committed Dec 18, 2016
1 parent 8ef6975 commit 7939a4b
Show file tree
Hide file tree
Showing 8 changed files with 7 additions and 10 deletions.
6 changes: 2 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -436,11 +436,9 @@ $> npm run types

### Browserify integration

protobuf.js integrates into any browserify build-process. There are a few possible tweaks:
By default, protobuf.js integrates into your browserify build-process without requiring any optional modules. Hence:

* If performance is a concern or IE8 support is required, you should make sure to exclude the browserified `buffer` module and let protobuf.js do its thing with Uint8Array/Array instead.
* If you do not need int64 support, you can explicitly exclude the `long` module. It will be included otherwise.
* If your application does not rely on the following modules and package size is a concern, you can also exclude `process` , `_process` and `fs`.
* If you need int64 support, explicitly require the `long` module somewhere in your project. It will be excluded otherwise.
* If you have any special requirements, there is [the bundler](https://github.com/dcodeIO/protobuf.js/blob/master/scripts/bundle.js) as a reference.

Performance
Expand Down
2 changes: 1 addition & 1 deletion dist/protobuf.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/protobuf.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file modified dist/protobuf.min.js.gz
Binary file not shown.
2 changes: 1 addition & 1 deletion dist/runtime/protobuf.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/runtime/protobuf.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file modified dist/runtime/protobuf.min.js.gz
Binary file not shown.
3 changes: 1 addition & 2 deletions scripts/bundle.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,7 @@ function bundle(compress, runtime) {
.external("long")
.external("buffer")
.exclude("process")
.exclude("_process") // what is it...
.exclude("fs")
.exclude("_process")
.plugin(require('bundle-collapser/plugin'))
.bundle()
.pipe(source(compress ? 'protobuf.min.js' : 'protobuf.js'))
Expand Down

0 comments on commit 7939a4b

Please sign in to comment.