Skip to content

Commit

Permalink
More micromodules; A lot of minor optimizations to performance and gz…
Browse files Browse the repository at this point in the history
…ip ratio
  • Loading branch information
dcodeIO committed Dec 12, 2016
1 parent 28a1d26 commit ce41d0e
Show file tree
Hide file tree
Showing 50 changed files with 1,616 additions and 777 deletions.
5 changes: 3 additions & 2 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@
"no-catch-shadow": 1,
"no-label-var": 1,
"no-restricted-globals": 1,
"no-return-assign": 1,
"no-return-assign": 0, // can make sense.
"no-shadow-restricted-names": 1,
"no-shadow": 0, // this is javascript. it has forEach and all that stuff.
"no-undef-init": 1,
Expand All @@ -113,7 +113,8 @@

// Stylistic Issues
"semi": 1, // maybe next time
"no-extra-semi": 1
"no-extra-semi": 1,
"quotes": 1 // useful for gzip

// ECMAScript 6 // maybe next time
}
Expand Down
3 changes: 3 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,11 @@ types/types.d.ts
bench.txt
docs/
examples/
src/util/aspromise/
src/util/base64/
src/util/codegen/
src/util/eventemitter/
src/util/fetch/
src/util/fs/
src/util/pool/
src/util/utf8/
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,7 @@ $> npm run types
protobuf.js integrates into any browserify build-process. There are a few possible tweaks:

* 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 exclude the `long` module.
* 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 have any special requirements, there is [the bundler](https://github.com/dcodeIO/protobuf.js/blob/master/scripts/bundle.js) as a reference.

Expand Down
2 changes: 0 additions & 2 deletions cli/targets/static.js
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,6 @@ function buildFunction(type, functionName, gen, scope) {
}).join(',') + "]);");
push("return " + lines[0]);
lines.slice(1).forEach(function(line) {
if (line === '\t"use strict"')
return;
var prev = indent;
var i = 0;
while (line.charAt(i++) === "\t")
Expand Down
Loading

0 comments on commit ce41d0e

Please sign in to comment.