Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there any way to unjs (like uncss)

If we are using Bootstrap or other front end frameworks(not quite sure), we can customize it by deselecting unused selector and then download it.

When it comes to javascript, like jquery for instance, minified version of 1.10.2 is 90.92kb(source). If I only use one or two effect, is there any way to unjs it, just like the CSS way uncss.

like image 584
Yang Wei Avatar asked Jun 17 '14 13:06

Yang Wei


1 Answers

You could use Google's Closure Compiler It "parses your JavaScript, analyzes it, removes dead code and rewrites and minimizes what's left. It also checks syntax, variable references, and types, and warns about common JavaScript pitfalls."

There's also Bransey's Dead JS Eliminator available on Github

like image 144
Rachel Gallen Avatar answered Sep 21 '22 23:09

Rachel Gallen