You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on May 28, 2019. It is now read-only.
The source is currently delivered as a single monolithic blob, with a giant runInContext function. This makes it difficult to follow what we're exporting, and tangles up internal state in each function.
It also means we can't break up JSON 3 into custom builds—i.e., just the date serialization fixes, stringify only, parse only, or including a subset of the feature tests. (This isn't nearly as important as for a general-purpose library like jQuery or lodash, but it's still painful to download ~4 KB of dead code). This might also make it easier for the Closure Compiler to prune unused code paths.
The feature/webpack branch is my first cut at making this happen—break up the internals, then use a builder like webpack (or Browserify) to stitch them together. We'll need to rework our exports system, but there are modules for adding AMD and global wrappers that we could use.
The text was updated successfully, but these errors were encountered:
It seems great to me. The various if branches have been leaving me confused for a while. It also makes sense to download only the code for say JSON.parse if that is the only function you use.
ghost
pushed a commit
that referenced
this issue
Mar 8, 2015
The source is currently delivered as a single monolithic blob, with a giant
runInContext
function. This makes it difficult to follow what we're exporting, and tangles up internal state in each function.It also means we can't break up JSON 3 into custom builds—i.e., just the date serialization fixes,
stringify
only,parse
only, or including a subset of the feature tests. (This isn't nearly as important as for a general-purpose library like jQuery or lodash, but it's still painful to download ~4 KB of dead code). This might also make it easier for the Closure Compiler to prune unused code paths.The
feature/webpack
branch is my first cut at making this happen—break up the internals, then use a builder like webpack (or Browserify) to stitch them together. We'll need to rework our exports system, but there are modules for adding AMD and global wrappers that we could use.The text was updated successfully, but these errors were encountered: