On Friday, May 15, 2015 at 9:51:31 AM UTC-4, Ingwie Phoenix wrote:
>
> Hey. 
>
> When working with C++ stuff, I usually see myself running the stirp over 
> the resulting binary to press down the filesize on a Release target. 
> However, there seems to be no such thing for JavaScript. 
>
> What I am actually wanting to do, is to shrink jQuery. It has tons, and 
> tons, and tons of stuff inside of it, and it is like so much, I only use 
> 10% of it, when it comes to it. 
>
> So I was looking for some tool that strips unused codeā€¦ 


That's actually not analogous to strip(1), since all strip does is remove 
debugging -- roughly equivalent to stripping source maps from javascript.

What you need is dead code elimination, much like a whole-program link-time 
optimizer can do for C.

Google Closure Compiler does some of this; there may be others, though dead 
code detection and elimination is definitely something still being studied. 
Sometimes there are obvious cases, sometimes there are not. Detecting those 
edge cases are the hard continuing research.

Aria

-- 
Job board: http://jobs.nodejs.org/
New group rules: 
https://gist.github.com/othiym23/9886289#file-moderation-policy-md
Old group rules: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
--- 
You received this message because you are subscribed to the Google Groups 
"nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to nodejs+unsubscr...@googlegroups.com.
To post to this group, send email to nodejs@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/nodejs/8533b5cc-c6d2-4251-bc33-912d88f97934%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to