Hacker News new | past | comments | ask | show | jobs | submit login

It would be great if I could scan my current js and build the jquip based on that. Actually, there should be a tool that removes all unnecessary code that's never called. Might be hard or impossible to get that working reliably though.



Using something like uglify's parse-js.js [1] that gives you back the AST might be the right way to go about it. Just count the calls to each $ method in your code.

[1] https://github.com/mishoo/UglifyJS/blob/master/lib/parse-js....


Google Closure does precisely that, although it may require some annotations to do so reliably.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: