Skip to content

Commit ce41d0e

Browse files
committed
More micromodules; A lot of minor optimizations to performance and gzip ratio
1 parent 28a1d26 commit ce41d0e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+1616
-777
lines changed

.eslintrc.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@
9191
"no-catch-shadow": 1,
9292
"no-label-var": 1,
9393
"no-restricted-globals": 1,
94-
"no-return-assign": 1,
94+
"no-return-assign": 0, // can make sense.
9595
"no-shadow-restricted-names": 1,
9696
"no-shadow": 0, // this is javascript. it has forEach and all that stuff.
9797
"no-undef-init": 1,
@@ -113,7 +113,8 @@
113113

114114
// Stylistic Issues
115115
"semi": 1, // maybe next time
116-
"no-extra-semi": 1
116+
"no-extra-semi": 1,
117+
"quotes": 1 // useful for gzip
117118

118119
// ECMAScript 6 // maybe next time
119120
}

.npmignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,11 @@ types/types.d.ts
66
bench.txt
77
docs/
88
examples/
9+
src/util/aspromise/
910
src/util/base64/
1011
src/util/codegen/
1112
src/util/eventemitter/
13+
src/util/fetch/
14+
src/util/fs/
1215
src/util/pool/
1316
src/util/utf8/

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -371,7 +371,7 @@ $> npm run types
371371
protobuf.js integrates into any browserify build-process. There are a few possible tweaks:
372372

373373
* 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.
374-
* If you do not need int64 support, you can exclude the `long` module.
374+
* If you do not need int64 support, you can explicitly exclude the `long` module. It will be included otherwise.
375375
* If your application does not rely on the following modules and package size is a concern, you can also exclude `process` , `_process` and `fs`.
376376
* If you have any special requirements, there is [the bundler](https://github.com/dcodeIO/protobuf.js/blob/master/scripts/bundle.js) as a reference.
377377

cli/targets/static.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,8 +128,6 @@ function buildFunction(type, functionName, gen, scope) {
128128
}).join(',') + "]);");
129129
push("return " + lines[0]);
130130
lines.slice(1).forEach(function(line) {
131-
if (line === '\t"use strict"')
132-
return;
133131
var prev = indent;
134132
var i = 0;
135133
while (line.charAt(i++) === "\t")

0 commit comments

Comments
 (0)