-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
I noticed that the build system has created a lot of boilerplate and indirection in the bundle. It's effectively a concatenation script, but with some special semantics that are plainly very unidiomatic, and introduce numerous otherwise-unnecessary closures at load time.
To give an example, here's a snippet from your src/errors@Parser.js
this.err = function(errorType, errParams) {
errParams = this.normalize(errParams);
return this.errorListener.onErr(errorType, errParams);
};You could just as easily do this instead:
Parser.prototype.err = function(errorType, errParams) {
errParams = this.normalize(errParams);
return this.errorListener.onErr(errorType, errParams);
};Doing this would let you just make your build script a glorified cat program, that just happens to wrap everything in an IIFE.
This would be much simpler to write and maintain, even if you decided to keep the naming convention. In fact, UglifyJS2 already does similar.
Metadata
Metadata
Assignees
Labels
No labels