3 ms·
edit: removed snark. You should not be worrying about object size. Write libraries in a way that makes sense for your problem, then use Closure compiler to str
by aboodman 13y ago
edit: removed snark.
You should not be worrying about object size. Write libraries in a way that makes sense for your problem, then use Closure compiler to strip the unused code from each application.
- mrjoelkemp 13y agoCheers for mentioning the closure compiler; I'll look into it. I haven't noticed much literature on its use in current build systems; I guess r.js gets all the fame due to its easier api.
- aboodman 13y agoRequire.js doesn't remove unused code like the closure compiler does. That feature is critical for building general purpose libraries because it allows you to organize on conceptual boundaries without worrying so much about code size.